[Checkbox] Fix when disabled
This commit is contained in:
+6
-4
@@ -44,10 +44,12 @@ void CheckBox::onEvent(event_t event)
|
|||||||
#if defined(HARDWARE_TOUCH)
|
#if defined(HARDWARE_TOUCH)
|
||||||
bool CheckBox::onTouchEnd(coord_t x, coord_t y)
|
bool CheckBox::onTouchEnd(coord_t x, coord_t y)
|
||||||
{
|
{
|
||||||
onKeyPress();
|
if (enabled) {
|
||||||
_setValue(!getValue());
|
onKeyPress();
|
||||||
setFocus(SET_FOCUS_DEFAULT);
|
_setValue(!getValue());
|
||||||
invalidate();
|
setFocus(SET_FOCUS_DEFAULT);
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user