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();

View File

@@ -245,7 +245,7 @@ static const std::vector<std::vector<std::vector<std::wstring>>> elements = {
/// ASCII art "video".
/// @param charset_index The type of "video".
/// @param image_index The "frame" of the video. You need to increase this for
///every "step".
/// every "step".
/// @ingroup dom
Element spinner(int charset_index, size_t image_index) {
if (charset_index == 0) {

View File

@@ -41,7 +41,7 @@ Elements operator|(Elements elements, Decorator decorator) {
/// @brief From an element, apply a decorator.
/// @return the decorated element.
/// @ingroup dom
///
///
/// ### Example
///
/// Both of these are equivalent:

View File

@@ -268,3 +268,7 @@ ColorInfo GetColorInfo(Color::Palette256 index) {
// clang-format off
}
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.