Changeset - r25326:a648699dc1da
[Not reviewed]
master
0 1 0
Peter Nelson - 3 years ago 2021-04-20 10:49:34
peter1138@openttd.org
Codechange: Apply minimum size to toolbar widgets
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/toolbar_gui.cpp
Show inline comments
 
@@ -2231,13 +2231,15 @@ static NWidgetBase *MakeMainToolbar(int 
 
			case WID_TN_ZOOM_IN:
 
			case WID_TN_BUILDING_TOOLS_START:
 
			case WID_TN_MUSIC_SOUND:
 
				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);
 
	return hor;
 
}
 

	
0 comments (0 inline, 0 general)