Popup less geschissen on sideways screens
This commit is contained in:
@ -38,10 +38,10 @@ void PopupDisplay::buttonPressed(espgui::Button button)
|
|||||||
|
|
||||||
void PopupDisplay::initOverlay()
|
void PopupDisplay::initOverlay()
|
||||||
{
|
{
|
||||||
constexpr auto leftMargin = 20;
|
const auto leftMargin = 20;
|
||||||
constexpr auto rightMargin = leftMargin;
|
const auto rightMargin = leftMargin;
|
||||||
constexpr auto topMargin = 50;
|
const auto topMargin = tft.height() > 300 ? 50 : 20;
|
||||||
constexpr auto bottomMargin = topMargin;
|
const auto bottomMargin = topMargin;
|
||||||
|
|
||||||
const auto width = espgui::tft.width() - leftMargin - rightMargin;
|
const auto width = espgui::tft.width() - leftMargin - rightMargin;
|
||||||
const auto height = espgui::tft.height() - topMargin - bottomMargin;
|
const auto height = espgui::tft.height() - topMargin - bottomMargin;
|
||||||
|
Reference in New Issue
Block a user