diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-20 11:49:34 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-04-30 17:08:15 +0100 |
commit | 63cc340dc189d3613a8604c8287fc8e647d5cb01 (patch) | |
tree | afa2825fd68dd7cc41421e516d32448c14ae142c /src | |
parent | d32df00b5c1040f34a4ade8c2a6911853b3ea00a (diff) | |
download | openttd-63cc340dc189d3613a8604c8287fc8e647d5cb01.tar.xz |
Codechange: Apply minimum size to toolbar widgets
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbar_gui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index fc8b18347..4cbd13dbf 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2234,7 +2234,9 @@ static NWidgetBase *MakeMainToolbar(int *biggest_index) hor->Add(new NWidgetSpacer(0, 0)); break; } - hor->Add(new NWidgetLeaf(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, toolbar_button_sprites[i], STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i)); + NWidgetLeaf *leaf = new NWidgetLeaf(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, toolbar_button_sprites[i], STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i); + leaf->SetMinimalSize(20, 20); + hor->Add(leaf); } *biggest_index = std::max<int>(*biggest_index, WID_TN_SWITCH_BAR); |