Skip to content

Commit

Permalink
Fix comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSonzogni committed Sep 30, 2024
1 parent 4aa8592 commit c86bd14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/ftxui/component/checkbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ class CheckboxBase : public ComponentBase, public CheckboxOption {
const bool is_active = Active();
auto focus_management = is_focused ? focus : is_active ? select : nothing;
auto entry_state = EntryState{
*label,
*checked,
is_active,
is_focused || hovered_,
-1,
*label, *checked, is_active, is_focused || hovered_, -1,
};
auto element = (transform ? transform : CheckboxOption::Simple().transform)(
entry_state);
Expand Down
2 changes: 1 addition & 1 deletion src/ftxui/component/component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ size_t ComponentBase::ChildCount() const {
return children_.size();
}

/// @brief Return index of child or -1 if not found.
/// @brief Return index of the component in its parent. -1 if no parent.
/// @ingroup component
int ComponentBase::Index() const {
if (parent_ == nullptr) {
Expand Down
6 changes: 1 addition & 5 deletions src/ftxui/component/radiobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ class RadioboxBase : public ComponentBase, public RadioboxOption {
: is_menu_focused ? focus
: select;
auto state = EntryState{
entries[i],
selected() == i,
is_selected,
is_focused,
i,
entries[i], selected() == i, is_selected, is_focused, i,
};
auto element =
(transform ? transform : RadioboxOption::Simple().transform)(state);
Expand Down

0 comments on commit c86bd14

Please sign in to comment.