Commit c578359 philmoz
committed
1 parent c5a7d6e commit c578359 Copy full SHA for c578359
File tree 2 files changed +4
-12
lines changed
radio/src/thirdparty/libopenui/src
2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 22
22
#include " themes/etx_lv_theme.h"
23
23
#include " translations.h"
24
24
25
- constexpr uint32_t MENUS_TOOLBAR_BUTTON_WIDTH = 36 ;
26
- constexpr uint32_t MENUS_TOOLBAR_BUTTON_HEIGHT = 32 ;
27
-
28
25
static const lv_obj_class_t menu_button_class = {
29
26
.base_class = &button_class,
30
27
.constructor_cb = nullptr ,
@@ -116,13 +113,13 @@ rect_t MenuToolbar::getButtonRect(bool wideButton)
116
113
coord_t x =
117
114
(nxtBtnPos % filterColumns) * (MENUS_TOOLBAR_BUTTON_WIDTH + PAD_SMALL);
118
115
coord_t y =
119
- (nxtBtnPos / filterColumns) * (MENUS_TOOLBAR_BUTTON_HEIGHT + PAD_SMALL);
116
+ (nxtBtnPos / filterColumns) * (EdgeTxStyles::UI_ELEMENT_HEIGHT + PAD_SMALL);
120
117
coord_t w = wideButton ? (MENUS_TOOLBAR_BUTTON_WIDTH + PAD_SMALL) *
121
118
(filterColumns - 1 ) +
122
119
MENUS_TOOLBAR_BUTTON_WIDTH
123
120
: MENUS_TOOLBAR_BUTTON_WIDTH;
124
121
nxtBtnPos += wideButton ? filterColumns : 1 ;
125
- return {x, y, w, MENUS_TOOLBAR_BUTTON_HEIGHT };
122
+ return {x, y, w, EdgeTxStyles::UI_ELEMENT_HEIGHT };
126
123
}
127
124
128
125
bool MenuToolbar::filterMenu (MenuToolbarButton* btn, int16_t filtermin,
Original file line number Diff line number Diff line change @@ -45,13 +45,8 @@ class MenuToolbar : public Window
45
45
46
46
virtual void longPress () {}
47
47
48
- static LAYOUT_VAL (MENUS_TOOLBAR_BUTTON_WIDTH, 32 , 32 )
49
-
50
- #if PORTRAIT_LCD
51
- static constexpr coord_t MENUS_MAX_HEIGHT = (ListBox::MENUS_LINE_HEIGHT * 10 );
52
- #else
53
- static constexpr coord_t MENUS_MAX_HEIGHT = (ListBox::MENUS_LINE_HEIGHT * 7 ) + 8 ;
54
- #endif
48
+ static LAYOUT_VAL (MENUS_TOOLBAR_BUTTON_WIDTH, 36 , 36 )
49
+ static LAYOUT_VAL(MENUS_MAX_HEIGHT, ListBox::MENUS_LINE_HEIGHT * 7 + 8 , ListBox::MENUS_LINE_HEIGHT * 10 )
55
50
56
51
protected:
57
52
Choice* choice;
You can’t perform that action at this time.
0 commit comments