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