mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 07:13:07 +01:00
Rename kCloseButtonWidth to kCloseButtonSize
This commit is contained in:
committed by
Gymnasiast
parent
87bb2f10dd
commit
e0f9a33923
@@ -562,13 +562,13 @@ namespace OpenRCT2::Ui
|
|||||||
int32_t width = widget->width() - 4;
|
int32_t width = widget->width() - 4;
|
||||||
if ((widget + 1)->type == WindowWidgetType::CloseBox)
|
if ((widget + 1)->type == WindowWidgetType::CloseBox)
|
||||||
{
|
{
|
||||||
width -= kCloseButtonWidth;
|
width -= kCloseButtonSize;
|
||||||
if ((widget + 2)->type == WindowWidgetType::CloseBox)
|
if ((widget + 2)->type == WindowWidgetType::CloseBox)
|
||||||
width -= kCloseButtonWidth;
|
width -= kCloseButtonSize;
|
||||||
}
|
}
|
||||||
topLeft.x += width / 2;
|
topLeft.x += width / 2;
|
||||||
if (Config::Get().interface.WindowButtonsOnTheLeft)
|
if (Config::Get().interface.WindowButtonsOnTheLeft)
|
||||||
topLeft.x += kCloseButtonWidth;
|
topLeft.x += kCloseButtonSize;
|
||||||
|
|
||||||
DrawTextEllipsised(
|
DrawTextEllipsised(
|
||||||
dpi, topLeft, width, widget->text, Formatter::Common(),
|
dpi, topLeft, width, widget->text, Formatter::Common(),
|
||||||
|
|||||||
@@ -481,11 +481,11 @@ namespace OpenRCT2
|
|||||||
if (Config::Get().interface.WindowButtonsOnTheLeft)
|
if (Config::Get().interface.WindowButtonsOnTheLeft)
|
||||||
{
|
{
|
||||||
widgets[2].left = 2;
|
widgets[2].left = 2;
|
||||||
widgets[2].right = 2 + kCloseButtonWidth;
|
widgets[2].right = 2 + kCloseButtonSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
widgets[2].left = width - 3 - kCloseButtonWidth;
|
widgets[2].left = width - 3 - kCloseButtonSize;
|
||||||
widgets[2].right = width - 3;
|
widgets[2].right = width - 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -564,7 +564,7 @@ namespace OpenRCT2
|
|||||||
|
|
||||||
ScreenCoordsXY WindowGetViewportSoundIconPos(WindowBase& w)
|
ScreenCoordsXY WindowGetViewportSoundIconPos(WindowBase& w)
|
||||||
{
|
{
|
||||||
const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonWidth + 2 : 0;
|
const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonSize + 2 : 0;
|
||||||
return w.windowPos + ScreenCoordsXY{ 2 + buttonOffset, 2 };
|
return w.windowPos + ScreenCoordsXY{ 2 + buttonOffset, 2 };
|
||||||
}
|
}
|
||||||
} // namespace OpenRCT2
|
} // namespace OpenRCT2
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace OpenRCT2
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr uint8_t kCloseButtonWidth = 10;
|
constexpr uint8_t kCloseButtonSize = 10;
|
||||||
|
|
||||||
constexpr int32_t kScrollableRowHeight = 12;
|
constexpr int32_t kScrollableRowHeight = 12;
|
||||||
constexpr uint8_t kListRowHeight = 12;
|
constexpr uint8_t kListRowHeight = 12;
|
||||||
|
|||||||
Reference in New Issue
Block a user