Skip to content

Commit c578359

Browse files
author
philmoz
committed
Fix rebase.
1 parent c5a7d6e commit c578359

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

radio/src/thirdparty/libopenui/src/menutoolbar.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include "themes/etx_lv_theme.h"
2323
#include "translations.h"
2424

25-
constexpr uint32_t MENUS_TOOLBAR_BUTTON_WIDTH = 36;
26-
constexpr uint32_t MENUS_TOOLBAR_BUTTON_HEIGHT = 32;
27-
2825
static const lv_obj_class_t menu_button_class = {
2926
.base_class = &button_class,
3027
.constructor_cb = nullptr,
@@ -116,13 +113,13 @@ rect_t MenuToolbar::getButtonRect(bool wideButton)
116113
coord_t x =
117114
(nxtBtnPos % filterColumns) * (MENUS_TOOLBAR_BUTTON_WIDTH + PAD_SMALL);
118115
coord_t y =
119-
(nxtBtnPos / filterColumns) * (MENUS_TOOLBAR_BUTTON_HEIGHT + PAD_SMALL);
116+
(nxtBtnPos / filterColumns) * (EdgeTxStyles::UI_ELEMENT_HEIGHT + PAD_SMALL);
120117
coord_t w = wideButton ? (MENUS_TOOLBAR_BUTTON_WIDTH + PAD_SMALL) *
121118
(filterColumns - 1) +
122119
MENUS_TOOLBAR_BUTTON_WIDTH
123120
: MENUS_TOOLBAR_BUTTON_WIDTH;
124121
nxtBtnPos += wideButton ? filterColumns : 1;
125-
return {x, y, w, MENUS_TOOLBAR_BUTTON_HEIGHT};
122+
return {x, y, w, EdgeTxStyles::UI_ELEMENT_HEIGHT};
126123
}
127124

128125
bool MenuToolbar::filterMenu(MenuToolbarButton* btn, int16_t filtermin,

radio/src/thirdparty/libopenui/src/menutoolbar.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@ class MenuToolbar : public Window
4545

4646
virtual void longPress() {}
4747

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)
5550

5651
protected:
5752
Choice* choice;

0 commit comments

Comments
 (0)