select fab carousel: fix dimensions

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent b3f6b92408
commit 90c23a15a5
3 changed files with 8 additions and 7 deletions
+1 -2
View File
@@ -38,8 +38,7 @@ FabButton::FabButton(FormGroup* parent, coord_t x, coord_t y, uint8_t icon,
std::function<uint8_t(void)> pressHandler,
WindowFlags windowFlags) :
Button(parent,
{x - FAB_BUTTON_SIZE / 2, y - FAB_BUTTON_SIZE / 2, FAB_BUTTON_SIZE,
FAB_BUTTON_SIZE},
{x, y, FAB_BUTTON_SIZE, FAB_BUTTON_SIZE},
pressHandler, windowFlags),
icon(icon)
{
+6 -4
View File
@@ -42,10 +42,12 @@ FullScreenDialog::FullScreenDialog(
Layer::push(this);
#if defined(HARDWARE_TOUCH)
new FabButton(this, LCD_W - 50, LCD_H - 50, ICON_NEXT, [=]() -> uint8_t {
if (confirmHandler) confirmHandler();
return 0;
});
new FabButton(this, LCD_W - (FAB_BUTTON_SIZE + PAGE_PADDING),
LCD_H - (FAB_BUTTON_SIZE + PAGE_PADDING), ICON_NEXT,
[=]() -> uint8_t {
if (confirmHandler) confirmHandler();
return 0;
});
#endif
bringToTop();
+1 -1
View File
@@ -26,7 +26,7 @@ SelectFabButton::SelectFabButton(FormGroup* parent, coord_t x, coord_t y,
std::function<uint8_t(void)> pressHandler,
WindowFlags windowFlags) :
// FabButton uses center coordinates, we want top left corner:
FabButton(parent, x + FAB_BUTTON_SIZE / 2, y + FAB_BUTTON_SIZE / 2, icon,
FabButton(parent, x, y, icon,
pressHandler, windowFlags),
title(title)
{