forked from rosebudai/OpenRCT2-Web
Improve save field alignment in file browser window (#26916)
* Improve save field alignment in file browser window * Adjust kButtonFaceHeight to match actual usage * Keep marketing campaign buttons overlapping The buttons themselves were already defined as 14px high, but now the constant has changed as well.
This commit is contained in:
1 parent
34e8149e93
commit
bc68828c7d
3 files changed
+9
-9
No files matched your search
@@ -684,8 +684,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
campaignButton.setVisible();
|
||||
campaignButton.top = y;
|
||||
campaignButton.bottom = y + kButtonFaceHeight + 1;
|
||||
y += kButtonFaceHeight + 2;
|
||||
campaignButton.bottom = y + kButtonFaceHeight;
|
||||
y += kButtonFaceHeight + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -692,15 +692,15 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
if (action == LoadSaveAction::save)
|
||||
{
|
||||
widgets[WIDX_SCROLL].bottom -= 18;
|
||||
widgets[WIDX_SCROLL].bottom -= kButtonFaceHeight + 7;
|
||||
|
||||
// Get 'Save' button string width
|
||||
auto saveLabel = LanguageGetString(STR_FILEBROWSER_SAVE_BUTTON);
|
||||
auto saveLabelWidth = getStringWidth(saveLabel, FontStyle::medium) + 12;
|
||||
|
||||
widgets[WIDX_SAVE].setVisible();
|
||||
widgets[WIDX_SAVE].top = height - paddingBottom - 15;
|
||||
widgets[WIDX_SAVE].bottom = height - paddingBottom - 3;
|
||||
widgets[WIDX_SAVE].bottom = height - paddingBottom - 2;
|
||||
widgets[WIDX_SAVE].top = widgets[WIDX_SAVE].bottom - kButtonFaceHeight;
|
||||
widgets[WIDX_SAVE].right = widgets[WIDX_SCROLL].right;
|
||||
widgets[WIDX_SAVE].left = widgets[WIDX_SAVE].right - saveLabelWidth;
|
||||
|
||||
@@ -709,8 +709,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto filenameLabelWidth = getStringWidth(filenameLabel, FontStyle::medium);
|
||||
|
||||
widgets[WIDX_FILENAME_TEXTBOX].setVisible();
|
||||
widgets[WIDX_FILENAME_TEXTBOX].top = height - paddingBottom - 15;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].bottom = height - paddingBottom - 3;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].bottom = height - paddingBottom - 2;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].top = widgets[WIDX_FILENAME_TEXTBOX].bottom - kButtonFaceHeight;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].left = 4 + filenameLabelWidth + 6;
|
||||
widgets[WIDX_FILENAME_TEXTBOX].right = widgets[WIDX_SAVE].left - 5;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
if (action == LoadSaveAction::save)
|
||||
{
|
||||
auto& widget = widgets[WIDX_FILENAME_TEXTBOX];
|
||||
drawText(rt, windowPos + ScreenCoordsXY{ 5, widget.top + 2 }, STR_FILENAME_LABEL, { Drawing::Colour::grey });
|
||||
drawText(rt, windowPos + ScreenCoordsXY{ 5, widget.top + 1 }, STR_FILENAME_LABEL, { Drawing::Colour::grey });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace OpenRCT2
|
||||
constexpr int32_t kScrollableRowHeight = 12;
|
||||
constexpr uint8_t kListRowHeight = 12;
|
||||
constexpr uint8_t kTableCellHeight = 12;
|
||||
constexpr uint8_t kButtonFaceHeight = 12;
|
||||
constexpr uint8_t kButtonFaceHeight = 14;
|
||||
constexpr uint8_t kSpinnerHeight = 14;
|
||||
constexpr uint8_t kDropdownHeight = 14;
|
||||
|
||||
|
||||
Reference in new issue
Block a user