Make 'back' hitbox bigger for touch
This commit is contained in:
committed by
Raphael Coeffic
parent
bb4eedd073
commit
0e71cb180d
@@ -26,7 +26,7 @@ PageHeader::PageHeader(Page * parent, uint8_t icon):
|
|||||||
FormGroup(parent, { 0, 0, LCD_W, MENU_HEADER_HEIGHT }, OPAQUE),
|
FormGroup(parent, { 0, 0, LCD_W, MENU_HEADER_HEIGHT }, OPAQUE),
|
||||||
icon(icon)
|
icon(icon)
|
||||||
#if defined(HARDWARE_TOUCH)
|
#if defined(HARDWARE_TOUCH)
|
||||||
, back(this, { 0, 0, MENU_HEADER_BUTTON_WIDTH, MENU_HEADER_BUTTON_WIDTH },
|
, back(this, { 0, 0, MENU_HEADER_BACK_BUTTON_WIDTH, MENU_HEADER_BACK_BUTTON_HEIGHT },
|
||||||
[=]() -> uint8_t {
|
[=]() -> uint8_t {
|
||||||
parent->deleteLater();
|
parent->deleteLater();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
TabsGroupHeader::TabsGroupHeader(TabsGroup * parent, uint8_t icon):
|
TabsGroupHeader::TabsGroupHeader(TabsGroup * parent, uint8_t icon):
|
||||||
FormGroup(parent, { 0, 0, LCD_W, MENU_BODY_TOP }, OPAQUE),
|
FormGroup(parent, { 0, 0, LCD_W, MENU_BODY_TOP }, OPAQUE),
|
||||||
#if defined(HARDWARE_TOUCH)
|
#if defined(HARDWARE_TOUCH)
|
||||||
back(this, { 0, 0, MENU_HEADER_BUTTON_WIDTH, MENU_HEADER_BUTTON_WIDTH },
|
back(this, { 0, 0, MENU_HEADER_BACK_BUTTON_WIDTH, MENU_HEADER_BACK_BUTTON_HEIGHT },
|
||||||
[=]() -> uint8_t {
|
[=]() -> uint8_t {
|
||||||
parent->deleteLater();
|
parent->deleteLater();
|
||||||
ViewMain::instance()->setFocus((SET_FOCUS_DEFAULT));
|
ViewMain::instance()->setFocus((SET_FOCUS_DEFAULT));
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ constexpr uint32_t MENU_FOOTER_TOP = LCD_H - MENU_FOOTER_HEIGHT;
|
|||||||
constexpr uint32_t MENU_BODY_HEIGHT = MENU_FOOTER_TOP - MENU_BODY_TOP;
|
constexpr uint32_t MENU_BODY_HEIGHT = MENU_FOOTER_TOP - MENU_BODY_TOP;
|
||||||
constexpr uint32_t MENUS_MARGIN_LEFT = 6;
|
constexpr uint32_t MENUS_MARGIN_LEFT = 6;
|
||||||
|
|
||||||
|
constexpr uint32_t MENU_HEADER_BACK_BUTTON_WIDTH = MENU_HEADER_HEIGHT;
|
||||||
|
constexpr uint32_t MENU_HEADER_BACK_BUTTON_HEIGHT = MENU_HEADER_HEIGHT;
|
||||||
|
|
||||||
constexpr coord_t PAGE_PADDING = 6;
|
constexpr coord_t PAGE_PADDING = 6;
|
||||||
constexpr uint32_t PAGE_LINE_HEIGHT = 20;
|
constexpr uint32_t PAGE_LINE_HEIGHT = 20;
|
||||||
constexpr uint32_t PAGE_LINE_SPACING = 2;
|
constexpr uint32_t PAGE_LINE_SPACING = 2;
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ constexpr uint32_t MENU_FOOTER_TOP = LCD_H - MENU_FOOTER_HEIGHT;
|
|||||||
constexpr uint32_t MENU_BODY_HEIGHT = MENU_FOOTER_TOP - MENU_BODY_TOP;
|
constexpr uint32_t MENU_BODY_HEIGHT = MENU_FOOTER_TOP - MENU_BODY_TOP;
|
||||||
constexpr uint32_t MENUS_MARGIN_LEFT = 6;
|
constexpr uint32_t MENUS_MARGIN_LEFT = 6;
|
||||||
|
|
||||||
|
constexpr uint32_t MENU_HEADER_BACK_BUTTON_WIDTH = MENU_HEADER_HEIGHT;
|
||||||
|
constexpr uint32_t MENU_HEADER_BACK_BUTTON_HEIGHT = MENU_HEADER_HEIGHT;
|
||||||
|
|
||||||
constexpr coord_t PAGE_PADDING = 6;
|
constexpr coord_t PAGE_PADDING = 6;
|
||||||
constexpr uint32_t PAGE_LINE_HEIGHT = 20;
|
constexpr uint32_t PAGE_LINE_HEIGHT = 20;
|
||||||
constexpr uint32_t PAGE_LINE_SPACING = 2;
|
constexpr uint32_t PAGE_LINE_SPACING = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user