Skip to content

Commit 404473f

Browse files
FlamefireFlow86
authored andcommitted
Fix size of Settings window
The rowWidth constant use was missing the adjustment for the left offset. The window height also needs to be adjusted. Before: Last control y = 124+26=150, height=172 (i.e. +22) Now : Last control y = 177 -> +22 = height
1 parent 7f36be5 commit 404473f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libs/s25main/ingameWindows/iwSettings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ constexpr auto ID_btOff = 0;
3030
} // namespace
3131

3232
iwSettings::iwSettings()
33-
: IngameWindow(CGI_SETTINGS, IngameWindow::posLastOrCenter, Extent(370, 172), _("Settings"),
33+
: IngameWindow(CGI_SETTINGS, IngameWindow::posLastOrCenter, Extent(370, 199), _("Settings"),
3434
LOADER.GetImageN("resource", 41))
3535
{
3636
// Controls are in 2 columns, the left might be the label for the control on the right
@@ -68,7 +68,7 @@ iwSettings::iwSettings()
6868
optiongroup->SetSelection(SETTINGS.video.fullscreen); //-V807
6969

7070
curPos = DrawPoint(leftColOffset, curPos.y + ctrlSize.y + 5);
71-
const auto cbSize = Extent(rowWidth, 26);
71+
const auto cbSize = Extent(rowWidth - curPos.x, 26);
7272
AddCheckBox(ID_cbInvertMouse, curPos, cbSize, TextureColor::Grey, _("Invert Mouse Pan"), NormalFont, false)
7373
->setChecked(SETTINGS.interface.invertMouse);
7474
curPos.y += cbSize.y + 3;

0 commit comments

Comments
 (0)