# HG changeset patch # User Peter Nelson # Date 2021-04-20 10:49:34 # Node ID a648699dc1dafd789d7744a094092ae19dc42502 # Parent 1a2614202cf875f3108d38ecc87713c50778ab96 Codechange: Apply minimum size to toolbar widgets diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2234,7 +2234,9 @@ static NWidgetBase *MakeMainToolbar(int 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(*biggest_index, WID_TN_SWITCH_BAR);