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,
|
std::function<uint8_t(void)> pressHandler,
|
||||||
WindowFlags windowFlags) :
|
WindowFlags windowFlags) :
|
||||||
Button(parent,
|
Button(parent,
|
||||||
{x - FAB_BUTTON_SIZE / 2, y - FAB_BUTTON_SIZE / 2, FAB_BUTTON_SIZE,
|
{x, y, FAB_BUTTON_SIZE, FAB_BUTTON_SIZE},
|
||||||
FAB_BUTTON_SIZE},
|
|
||||||
pressHandler, windowFlags),
|
pressHandler, windowFlags),
|
||||||
icon(icon)
|
icon(icon)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,10 +42,12 @@ FullScreenDialog::FullScreenDialog(
|
|||||||
Layer::push(this);
|
Layer::push(this);
|
||||||
|
|
||||||
#if defined(HARDWARE_TOUCH)
|
#if defined(HARDWARE_TOUCH)
|
||||||
new FabButton(this, LCD_W - 50, LCD_H - 50, ICON_NEXT, [=]() -> uint8_t {
|
new FabButton(this, LCD_W - (FAB_BUTTON_SIZE + PAGE_PADDING),
|
||||||
if (confirmHandler) confirmHandler();
|
LCD_H - (FAB_BUTTON_SIZE + PAGE_PADDING), ICON_NEXT,
|
||||||
return 0;
|
[=]() -> uint8_t {
|
||||||
});
|
if (confirmHandler) confirmHandler();
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bringToTop();
|
bringToTop();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ SelectFabButton::SelectFabButton(FormGroup* parent, coord_t x, coord_t y,
|
|||||||
std::function<uint8_t(void)> pressHandler,
|
std::function<uint8_t(void)> pressHandler,
|
||||||
WindowFlags windowFlags) :
|
WindowFlags windowFlags) :
|
||||||
// FabButton uses center coordinates, we want top left corner:
|
// 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),
|
pressHandler, windowFlags),
|
||||||
title(title)
|
title(title)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user