mirror of
https://github.com/ArthurSonzogni/ftxui.git
synced 2026-01-18 17:21:33 +01:00
Make Input style colorscheme agnostic.
This wasn't working well with pytxis. Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/1170
This commit is contained in:
@@ -46,6 +46,8 @@ Next
|
||||
- Fix Windows UTF-16 key input handling. Emoji and other code points outside the
|
||||
Basic Multilingual Plane (BMP) are now correctly processed. Thanks @739C1AE2
|
||||
in #1160 for fixing the issue.
|
||||
- Fix Input style is now colorschem agnostic. Thanks @Smail in #1170 for reporting
|
||||
and fixing the issue.
|
||||
|
||||
### Dom
|
||||
- Fix integer overflow in `ComputeShrinkHard`. Thanks @its-pablo in #1137 for
|
||||
|
||||
@@ -292,8 +292,6 @@ RadioboxOption RadioboxOption::Simple() {
|
||||
InputOption InputOption::Default() {
|
||||
InputOption option;
|
||||
option.transform = [](InputState state) {
|
||||
state.element |= color(Color::White);
|
||||
|
||||
if (state.is_placeholder) {
|
||||
state.element |= dim;
|
||||
}
|
||||
@@ -301,7 +299,7 @@ InputOption InputOption::Default() {
|
||||
if (state.focused) {
|
||||
state.element |= inverted;
|
||||
} else if (state.hovered) {
|
||||
state.element |= bgcolor(Color::GrayDark);
|
||||
state.element |= underlined;
|
||||
}
|
||||
|
||||
return state.element;
|
||||
@@ -315,18 +313,15 @@ InputOption InputOption::Spacious() {
|
||||
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);
|
||||
}
|
||||
|
||||
if (state.hovered) {
|
||||
state.element |= bgcolor(Color::GrayDark);
|
||||
state.element |= inverted;
|
||||
} else if (state.hovered) {
|
||||
state.element |= bold;
|
||||
}
|
||||
|
||||
return state.element;
|
||||
|
||||
Reference in New Issue
Block a user