mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-29 16:39:34 +08:00
Run IWYU. (#208)
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
#include <stddef.h> // for size_t
|
||||
#include <algorithm> // for max, min
|
||||
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared, allocator, __shared_ptr_access<>::element_type, allocator_traits<>::value_type
|
||||
#include <memory> // for make_shared, __shared_ptr_access, allocator, shared_ptr, allocator_traits<>::value_type
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/component/component.hpp" // for Component, Components, Horizontal, Vertical, Tab
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||
#include "ftxui/component/component.hpp" // for Horizontal, Vertical, Tab
|
||||
#include "ftxui/component/component_base.hpp" // for Components, Component, ComponentBase
|
||||
#include "ftxui/component/event.hpp" // for Event, Event::Tab, Event::TabReverse, Event::ArrowDown, Event::ArrowLeft, Event::ArrowRight, Event::ArrowUp
|
||||
#include "ftxui/dom/elements.hpp" // for text, Elements, Element, hbox, vbox
|
||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::WheelDown, Mouse::WheelUp
|
||||
#include "ftxui/dom/elements.hpp" // for text, Elements, operator|, reflect, Element, hbox, vbox
|
||||
#include "ftxui/screen/box.hpp" // for Box
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
|
@@ -185,10 +185,10 @@ Component MenuEntry(ConstStringRef label, Ref<MenuEntryOption> option) {
|
||||
private:
|
||||
Element Render() override {
|
||||
bool focused = Focused();
|
||||
auto style = hovered_ ? (focused ? option_->style_selected_focused
|
||||
: option_->style_selected)
|
||||
: (focused ? option_->style_focused
|
||||
: option_->style_normal);
|
||||
auto style =
|
||||
hovered_ ? (focused ? option_->style_selected_focused
|
||||
: option_->style_selected)
|
||||
: (focused ? option_->style_focused : option_->style_normal);
|
||||
auto focus_management = focused ? select : nothing;
|
||||
auto label = focused ? "> " + (*label_) //
|
||||
: " " + (*label_);
|
||||
|
Reference in New Issue
Block a user