onFocusLost calls now focusHandler(false) when this handler is set
This commit is contained in:
@@ -45,8 +45,10 @@ class CommonInputOrMixButton : public Button {
|
||||
Button(parent, rect),
|
||||
index(index)
|
||||
{
|
||||
setFocusHandler([=]() {
|
||||
setFocusHandler([=](bool active) {
|
||||
if (active) {
|
||||
bringToTop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -257,8 +257,10 @@ class ModelCategoryPageBody: public FormWindow {
|
||||
for (auto & model: * category) {
|
||||
auto button = new ModelButton(this, {x, y, MODEL_SELECT_CELL_WIDTH, MODEL_SELECT_CELL_HEIGHT}, model, nullptr);
|
||||
|
||||
button->setFocusHandler([=] {
|
||||
button->setFocusHandler([=](bool active) {
|
||||
if (active) {
|
||||
footer->setCurrentModel(model);
|
||||
}
|
||||
});
|
||||
|
||||
button->setPressHandler([=]() -> uint8_t {
|
||||
|
||||
@@ -257,8 +257,10 @@ void RadioSdManagerPage::build(FormWindow * window)
|
||||
}
|
||||
return 0;
|
||||
}, 0);
|
||||
button->setFocusHandler([=]() {
|
||||
button->setFocusHandler([=](bool active) {
|
||||
if (active) {
|
||||
preview->setFile(getFullPath(name));
|
||||
}
|
||||
});
|
||||
grid.nextLine();
|
||||
}
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: 9d283f2b80...a7b25ad594
Reference in New Issue
Block a user