Automatically fix style.

This commit is contained in:
ArthurSonzogni
2020-09-06 13:46:56 +02:00
committed by Arthur Sonzogni
parent d09996a6c7
commit 5291f660ca
50 changed files with 197 additions and 190 deletions

View File

@@ -6,7 +6,7 @@ namespace ftxui {
Element Button::Render() {
if (Focused())
return text(label) | border |inverted;
return text(label) | border | inverted;
else
return text(label) | border;
}

View File

@@ -13,7 +13,7 @@ Component::~Component() {
/// @brief Return the parent Component, or nul if any.
/// @see Attach
/// @see Detach
/// @see Parent
/// @see Parent
/// @ingroup component
Component* Component::Parent() {
return parent_;
@@ -100,7 +100,7 @@ void Component::TakeFocus() {
/// @brief Detach this children from its parent.
/// @see Attach
/// @see Detach
/// @see Parent
/// @see Parent
/// @ingroup component
void Component::Detach() {
if (!parent_)
@@ -113,7 +113,7 @@ void Component::Detach() {
/// @brief Attach this element to its parent.
/// @see Attach
/// @see Detach
/// @see Parent
/// @see Parent
/// @ingroup component
void Component::Attach(Component* parent) {
Detach();
@@ -121,7 +121,6 @@ void Component::Attach(Component* parent) {
parent_->children_.push_back(this);
}
} // namespace ftxui
// Copyright 2020 Arthur Sonzogni. All rights reserved.

View File

@@ -48,7 +48,7 @@ Component* Container::ActiveChild() {
}
void Container::SetActiveChild(Component* child) {
for(size_t i = 0; i < children_.size(); ++i) {
for (size_t i = 0; i < children_.size(); ++i) {
if (children_[i] == child) {
(selector_ ? *selector_ : selected_) = i;
return;

View File

@@ -199,7 +199,7 @@ TEST(ContainerTest, SetActiveChild) {
}
TEST(ContainerTest, TakeFocus) {
auto c= Container::Horizontal();
auto c = Container::Horizontal();
auto c1 = Container::Vertical();
auto c2 = Container::Vertical();
auto c3 = Container::Vertical();