mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-11-04 05:28:15 +08:00 
			
		
		
		
	Automatically fix style.
This commit is contained in:
		
				
					committed by
					
						
						Arthur Sonzogni
					
				
			
			
				
	
			
			
			
						parent
						
							d09996a6c7
						
					
				
				
					commit
					5291f660ca
				
			@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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.
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user