diff --git a/radio/src/thirdparty/libopenui/src/checkbox.cpp b/radio/src/thirdparty/libopenui/src/checkbox.cpp index 9b0da61d5..d143e1704 100644 --- a/radio/src/thirdparty/libopenui/src/checkbox.cpp +++ b/radio/src/thirdparty/libopenui/src/checkbox.cpp @@ -31,6 +31,7 @@ void CheckBox::onKeyEvent(event_t event) TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString().c_str(), event); if (event == EVT_KEY_BREAK(KEY_ENTER)) { + onKeyPress(); setValue(!getValue()); invalidate({0, 0, 20, 20}); } @@ -43,6 +44,7 @@ void CheckBox::onKeyEvent(event_t event) #if defined(HARDWARE_TOUCH) bool CheckBox::onTouchEnd(coord_t x, coord_t y) { + onKeyPress(); setValue(!getValue()); setFocus(); invalidate({0, 0, 20, 20}); diff --git a/radio/src/thirdparty/libopenui/src/checkbox.h b/radio/src/thirdparty/libopenui/src/checkbox.h index 0e199400f..dc87446c7 100644 --- a/radio/src/thirdparty/libopenui/src/checkbox.h +++ b/radio/src/thirdparty/libopenui/src/checkbox.h @@ -50,7 +50,6 @@ class CheckBox : public FormField { #endif protected: - const char * label; std::function getValue; std::function setValue; }; diff --git a/radio/src/thirdparty/libopenui/src/slider.cpp b/radio/src/thirdparty/libopenui/src/slider.cpp index ff981bdcf..c138f6921 100644 --- a/radio/src/thirdparty/libopenui/src/slider.cpp +++ b/radio/src/thirdparty/libopenui/src/slider.cpp @@ -38,10 +38,12 @@ void Slider::onKeyEvent(event_t event) if (editMode) { if (event == EVT_ROTARY_RIGHT) { setValue(getValue() + rotencSpeed); + onKeyPress(); return; } else if (event == EVT_ROTARY_LEFT) { setValue(getValue() - rotencSpeed); + onKeyPress(); return; } } @@ -54,6 +56,7 @@ void Slider::onKeyEvent(event_t event) bool Slider::onTouchStart(coord_t x, coord_t y) { if (!hasFocus()) { + onKeyPress(); setFocus(); } sliding = (value(x) == getValue()); @@ -64,6 +67,7 @@ bool Slider::onTouchEnd(coord_t x, coord_t y) { setValue(value(x)); invalidate(); + onKeyPress(); return true; } @@ -74,6 +78,7 @@ bool Slider::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY, if (getValue() != newValue) { setValue(newValue); invalidate(); + onKeyPress(); } } return true;