select fab carousel: fix dimensions
This commit is contained in:
committed by
Raphael Coeffic
parent
b3f6b92408
commit
90c23a15a5
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user