mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Fix slider focus. (#549)
This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/547 From discussion: https://github.com/ArthurSonzogni/FTXUI/discussions/546
This commit is contained in:
@@ -227,6 +227,7 @@ class SliderWithLabel : public ComponentBase {
|
||||
}
|
||||
|
||||
Element Render() override {
|
||||
auto focus_management = Focused() ? focus : Active() ? select : nothing;
|
||||
auto gauge_color = Focused() ? color(Color::White) : color(Color::GrayDark);
|
||||
return hbox({
|
||||
text(label_()) | dim | vcenter,
|
||||
@@ -236,7 +237,7 @@ class SliderWithLabel : public ComponentBase {
|
||||
text("]"),
|
||||
}) | xflex,
|
||||
}) |
|
||||
gauge_color | xflex | reflect(box_);
|
||||
gauge_color | xflex | reflect(box_) | focus_management;
|
||||
}
|
||||
|
||||
ConstStringRef label_;
|
||||
|
Reference in New Issue
Block a user