mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Remove ButtonOption::Arthur()
It was added by mistacke previously.
This commit is contained in:
parent
67717ab923
commit
98b31ff1fe
@ -152,8 +152,6 @@ struct InputOption {
|
|||||||
static InputOption Default();
|
static InputOption Default();
|
||||||
/// @brief A white on black style with high margins:
|
/// @brief A white on black style with high margins:
|
||||||
static InputOption Spacious();
|
static InputOption Spacious();
|
||||||
/// @brief A style with a border:
|
|
||||||
static InputOption Arthur();
|
|
||||||
|
|
||||||
/// The content of the input when it's empty.
|
/// The content of the input when it's empty.
|
||||||
StringRef placeholder = "";
|
StringRef placeholder = "";
|
||||||
|
@ -303,32 +303,6 @@ InputOption InputOption::Spacious() {
|
|||||||
return option;
|
return option;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
InputOption InputOption::Arthur() {
|
|
||||||
InputOption option;
|
|
||||||
option.transform = [](InputState state) {
|
|
||||||
state.element |= borderEmpty;
|
|
||||||
state.element |= color(Color::White);
|
|
||||||
|
|
||||||
if (state.is_placeholder) {
|
|
||||||
state.element |= dim;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.focused) {
|
|
||||||
state.element |= bgcolor(Color::Black);
|
|
||||||
} else {
|
|
||||||
state.element |= bgcolor(LinearGradient(0, Color::Blue, Color::Red));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.hovered) {
|
|
||||||
state.element |= bgcolor(Color::GrayDark);
|
|
||||||
}
|
|
||||||
|
|
||||||
return state.element;
|
|
||||||
};
|
|
||||||
return option;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ftxui
|
} // namespace ftxui
|
||||||
|
|
||||||
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
||||||
|
Loading…
Reference in New Issue
Block a user