mirror of https://github.com/OpenTTD/OpenTTD.git
Change: Restore original width of spacers in main toolbars.
Width for all spacers was included only due to an off-by-one from counting buttons and not excluding the normally hidden switcher button. Spacer width of half the button width is now included explicitly,
This commit is contained in:
parent
9b323b4ef9
commit
4711fe2040
|
@ -1378,7 +1378,8 @@ public:
|
|||
child_wid->current_x = child_wid->smallest_x;
|
||||
}
|
||||
}
|
||||
_toolbar_width = nbuttons * this->smallest_x;
|
||||
nbuttons--; // Exclude the switcher button which is not displayed when the toolbar fits the screen.
|
||||
_toolbar_width = nbuttons * this->smallest_x + this->spacers * this->smallest_x / 2;
|
||||
}
|
||||
|
||||
void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override
|
||||
|
|
Loading…
Reference in New Issue