Changeset - r13695:e0bf1a35834a
[Not reviewed]
src/ai/ai_gui.cpp
Show inline comments
 
@@ -76,7 +76,7 @@ struct AIListWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == AIL_WIDGET_LIST) {
 
			this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
 
@@ -279,7 +279,7 @@ struct AISettingsWindow : public Window 
 
		this->vscroll.SetCount((int)this->ai_config->GetConfigList()->size());
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == AIS_WIDGET_BACKGROUND) {
 
			this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
 
@@ -544,7 +544,7 @@ struct AIConfigWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case AIC_WIDGET_LIST:
 
@@ -698,7 +698,7 @@ struct AIDebugWindow : public Window {
 
		if (ai_debug_company != INVALID_COMPANY) this->LowerWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == AID_WIDGET_LOG_PANEL) {
 
			resize->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
src/autoreplace_gui.cpp
Show inline comments
 
@@ -231,7 +231,7 @@ public:
 
		this->sel_group = id_g;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case RVW_WIDGET_LEFT_MATRIX:
src/bridge_gui.cpp
Show inline comments
 
@@ -164,7 +164,7 @@ public:
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case BBSW_DROPDOWN_ORDER: {
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1086,7 +1086,7 @@ struct BuildVehicleWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case BUILD_VEHICLE_WIDGET_LIST:
src/cheat_gui.cpp
Show inline comments
 
@@ -215,7 +215,7 @@ struct CheatWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != CW_PANEL) return;
 

	
src/company_gui.cpp
Show inline comments
 
@@ -320,7 +320,7 @@ struct CompanyFinancesWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		int type = _settings_client.gui.expenses_layout;
 
		switch (widget) {
 
@@ -596,7 +596,7 @@ public:
 
		this->LowerWidget(SCLW_WIDGET_CLASS_GENERAL);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		/* Number of liveries in each class, used to determine the height of the livery matrix widget. */
 
		static const byte livery_height[] = {
 
@@ -1646,7 +1646,7 @@ struct CompanyWindow : Window
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case CW_WIDGET_DESC_COMPANY_VALUE:
 
@@ -1922,7 +1922,7 @@ struct BuyCompanyWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case BCW_FACE:
src/depot_gui.cpp
Show inline comments
 
@@ -612,7 +612,7 @@ struct DepotWindow : Window {
 
	uint flag_width;
 
	uint flag_height;
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case DEPOT_WIDGET_SELL_CHAIN:
src/engine_gui.cpp
Show inline comments
 
@@ -80,7 +80,7 @@ struct EnginePreviewWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != EPW_QUESTION) return;
 

	
src/genworld_gui.cpp
Show inline comments
 
@@ -411,7 +411,7 @@ struct GenerateLandscapeWindow : public 
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		const StringID *strs = NULL;
 
		switch (widget) {
 
@@ -901,7 +901,7 @@ struct CreateScenarioWindow : public Win
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		StringID str = STR_JUST_INT;
 
		switch (widget) {
 
@@ -1188,7 +1188,7 @@ struct GenerateProgressWindow : public W
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case GPWW_PROGRESS_BAR: {
src/graph_gui.cpp
Show inline comments
 
@@ -786,7 +786,7 @@ struct PaymentRatesGraphWindow : BaseGra
 
		this->InitNested(desc, window_number);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget < CPW_CARGO_FIRST) return;
 

	
 
@@ -1109,7 +1109,7 @@ struct PerformanceRatingDetailWindow : W
 
	uint score_detail_left;
 
	uint score_detail_right;
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case PRW_SCORE_FIRST:
src/group_gui.cpp
Show inline comments
 
@@ -249,7 +249,7 @@ public:
 
		*this->sorting = this->vehicles.GetListing();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case GRP_WIDGET_LIST_GROUP:
src/industry_gui.cpp
Show inline comments
 
@@ -207,7 +207,7 @@ public:
 
		this->InitNested(&_build_industry_desc, 0);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case DPIW_MATRIX_WIDGET: {
 
@@ -702,7 +702,7 @@ public:
 
		if (widget== IVW_CAPTION) SetDParam(0, this->window_number);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == IVW_INFO) size->height = this->info_height;
 
	}
 
@@ -1077,7 +1077,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case IDW_DROPDOWN_ORDER: {
src/intro_gui.cpp
Show inline comments
 
@@ -84,7 +84,7 @@ struct SelectGameWindow : public Window 
 
		if (widget == SGI_DIFFICULTIES) SetDParam(0, STR_DIFFICULTY_LEVEL_EASY + _settings_newgame.difficulty.diff_level);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != SGI_DIFFICULTIES) return;
 

	
src/misc_gui.cpp
Show inline comments
 
@@ -114,7 +114,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != LIW_BACKGROUND) return;
 

	
 
@@ -432,7 +432,7 @@ struct AboutWindow : public Window {
 
		if (widget == AW_WEBSITE) SetDParamStr(0, "Website: http://www.openttd.org");
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != AW_SCROLLING_TEXT) return;
 

	
 
@@ -559,7 +559,7 @@ public:
 
		this->InitNested(desc);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != EMW_MESSAGE) return;
 

	
 
@@ -823,7 +823,7 @@ struct TooltipsWindow : public Window
 
		return pt;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		/* There is only one widget. */
 
		for (uint i = 0; i != this->paramcount; i++) SetDParam(i, this->params[i]);
 
@@ -1339,7 +1339,7 @@ struct QueryStringWindow : public QueryS
 
		this->LowerWidget(QUERY_STR_WIDGET_TEXT);
 
	}
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == QUERY_STR_WIDGET_DEFAULT && (this->flags & QSF_ENABLE_DEFAULT) == 0) {
 
			this->GetWidget<NWidgetCore>(widget)->SetFill(0, 1);
 
@@ -1518,7 +1518,7 @@ struct QueryWindow : public Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != QUERY_WIDGET_TEXT) return;
 

	
 
@@ -1865,7 +1865,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case SLWW_CONTENT_DOWNLOAD_SEL:
src/music_gui.cpp
Show inline comments
 
@@ -250,7 +250,7 @@ struct MusicTrackSelectionWindow : publi
 
		this->SetDirty();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case MTSW_PLAYLIST: {
 
@@ -462,7 +462,7 @@ struct MusicWindow : public Window {
 
		this->SetWidgetLoweredState(MW_SHUFFLE, msf.shuffle);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			/* Make sure that MW_SHUFFLE and MW_PROGRAMME have the same size.
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -455,7 +455,7 @@ struct NetworkChatWindow : public QueryS
 
		return pt;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != NWCW_DESTINATION) return;
 

	
src/network/network_content_gui.cpp
Show inline comments
 
@@ -376,7 +376,7 @@ public:
 
		_network_content_client.RemoveCallback(this);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case NCLWW_FILTER_CAPT:
src/network/network_gui.cpp
Show inline comments
 
@@ -481,7 +481,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case NGWW_CONN_BTN:
 
@@ -1108,7 +1108,7 @@ struct NetworkStartServerWindow : public
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case NSSW_CONNTYPE_BTN:
 
@@ -1486,7 +1486,7 @@ struct NetworkLobbyWindow : public Windo
 
		return COMPANY_FIRST;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case NLWW_HEADER:
 
@@ -1904,7 +1904,7 @@ struct NetworkClientListPopupWindow : Wi
 
		return this->desired_location;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		Dimension d = *size;
 
		for (const ClientListAction *action = this->actions.Begin(); action != this->actions.End(); action++) {
 
@@ -2037,7 +2037,7 @@ struct NetworkClientListWindow : Window 
 
		return true;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != CLW_PANEL) return;
 

	
src/newgrf_gui.cpp
Show inline comments
 
@@ -264,7 +264,7 @@ public:
 
		this->SetWidgetDisabledState(ANGRFW_ADD, this->sel == NULL || this->sel->IsOpenTTDBaseGRF());
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case ANGRFW_GRF_LIST:
 
@@ -580,7 +580,7 @@ struct NewGRFWindow : public Window {
 
		_grf_preset_list.Clear();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case SNGRFS_FILE_LIST:
src/news_gui.cpp
Show inline comments
 
@@ -344,7 +344,7 @@ struct NewsWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		StringID str = STR_NULL;
 
		switch (widget) {
 
@@ -927,7 +927,7 @@ struct MessageHistoryWindow : Window {
 
		this->OnInvalidateData(0);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget == MHW_BACKGROUND) {
 
			this->line_height = FONT_HEIGHT_NORMAL + 2;
 
@@ -1114,7 +1114,7 @@ struct MessageOptionsWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget >= WIDGET_NEWSOPT_START_OPTION && widget < WIDGET_NEWSOPT_END_OPTION) {
 
			/* Height is the biggest widget height in a row. */
src/order_gui.cpp
Show inline comments
 
@@ -690,7 +690,7 @@ public:
 
		this->OnInvalidateData(-2);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case ORDER_WIDGET_TIMETABLE_VIEW:
src/rail_gui.cpp
Show inline comments
 
@@ -1085,7 +1085,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case BRSW_NEWST_DROPDOWN: {
src/settings_gui.cpp
Show inline comments
 
@@ -229,7 +229,7 @@ struct GameOptionsWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case GOW_BASE_GRF_DESCRIPTION:
 
@@ -569,7 +569,7 @@ public:
 
		SetDParam(0, sd->desc.str + value);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		/* Only for the 'descriptions' */
 
		int index = widget - GDW_OPTIONS_START;
 
@@ -1477,7 +1477,7 @@ struct GameSettingsWindow : Window {
 
		this->vscroll.SetCount(_settings_main_page.Length());
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != SETTINGSEL_OPTIONSPANEL) return;
 

	
 
@@ -1760,7 +1760,7 @@ struct CustomCurrencyWindow : Window {
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			/* Set the appropriate width for the edit 'buttons' */
src/signs_gui.cpp
Show inline comments
 
@@ -164,7 +164,7 @@ struct SignListWindow : Window, SignList
 
		this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(SLW_LIST)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case SLW_LIST: {
src/smallmap_gui.cpp
Show inline comments
 
@@ -856,7 +856,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != SM_WIDGET_LEGEND) return;
 

	
src/station_gui.cpp
Show inline comments
 
@@ -291,7 +291,7 @@ public:
 
		this->last_sorting = this->stations.GetListing();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case SLW_SORTDROPBTN: {
 
@@ -808,7 +808,7 @@ struct StationViewWindow : public Window
 
		DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11), false);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case SVW_WAITING:
 
@@ -1293,7 +1293,7 @@ struct SelectStationWindow : Window {
 
		this->OnInvalidateData(0);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != JSW_PANEL) return;
 

	
src/statusbar_gui.cpp
Show inline comments
 
@@ -109,7 +109,7 @@ struct StatusBarWindow : Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		size->height = FONT_HEIGHT_NORMAL + padding.height;
 
	}
src/subsidy_gui.cpp
Show inline comments
 
@@ -141,7 +141,7 @@ struct SubsidyListWindow : Window {
 
		return 3 + num_awarded + num_not_awarded;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != SLW_PANEL) return;
 
		Dimension d = maxdim(GetStringBoundingBox(STR_SUBSIDIES_OFFERED_TITLE), GetStringBoundingBox(STR_SUBSIDIES_SUBSIDISED_TITLE));
src/timetable_gui.cpp
Show inline comments
 
@@ -68,7 +68,7 @@ struct TimetableWindow : Window {
 
		this->sel_index = -1;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case TTV_TIMETABLE_PANEL:
src/toolbar_gui.cpp
Show inline comments
 
@@ -1437,7 +1437,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case TBSE_SPACERPANEL:
src/town_gui.cpp
Show inline comments
 
@@ -211,7 +211,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case TWA_ACTION_INFO: {
 
@@ -717,7 +717,7 @@ public:
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case TDW_SORTNAME:
src/tree_gui.cpp
Show inline comments
 
@@ -62,7 +62,7 @@ public:
 
		ResetObjectToPlace();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != BTW_MANY_RANDOM) return;
 

	
src/vehicle_gui.cpp
Show inline comments
 
@@ -351,7 +351,7 @@ struct RefitWindow : public Window {
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case VRW_MATRIX:
 
@@ -956,7 +956,7 @@ public:
 
		*this->sorting = this->vehicles.GetListing();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (widget != VLW_WIDGET_LIST) return;
 

	
 
@@ -1361,7 +1361,7 @@ struct VehicleDetailsWindow : Window {
 
		this->tab = TDW_TAB_CARGO;
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
 
			case VLD_WIDGET_TOP_DETAILS:
 
@@ -1849,7 +1849,7 @@ public:
 
		DeleteWindowById(WC_VEHICLE_TIMETABLE, this->window_number, false);
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize)
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		const Vehicle *v = Vehicle::Get(this->window_number);
 
		switch (widget) {
src/widget.cpp
Show inline comments
 
@@ -955,17 +955,17 @@ void NWidgetStacked::SetupSmallestSize(W
 

	
 
	/* Zero size plane selected */
 
	if (this->shown_plane == STACKED_SELECTION_ZERO_SIZE) {
 
		this->fill_x = 0;
 
		this->fill_y = 0;
 

	
 
		Dimension size = {0, 0};
 
		Dimension padding = {0, 0};
 
		Dimension fill = {0, 0};
 
		Dimension resize = {0, 0};
 
		Dimension padding = {0, 0};
 
		/* Here we're primarily interested in the value of resize */
 
		w->UpdateWidgetSize(this->index, &size, padding, &resize);
 
		w->UpdateWidgetSize(this->index, &size, padding, &fill, &resize);
 

	
 
		this->smallest_x = size.width;
 
		this->smallest_y = size.height;
 
		this->fill_x = fill.width;
 
		this->fill_y = fill.height;
 
		this->resize_x = resize.width;
 
		this->resize_y = resize.height;
 
		return;
 
@@ -1453,6 +1453,7 @@ void NWidgetBackground::SetupSmallestSiz
 
		}
 
	} else {
 
		Dimension d = {this->min_x, this->min_y};
 
		Dimension fill = {this->fill_x, this->fill_y};
 
		Dimension resize  = {this->resize_x, this->resize_y};
 
		if (w != NULL) { // A non-NULL window pointer acts as switch to turn dynamic widget size on.
 
			if (this->type == WWT_FRAME || this->type == WWT_INSET) {
 
@@ -1463,11 +1464,13 @@ void NWidgetBackground::SetupSmallestSiz
 
			}
 
			if (this->index >= 0) {
 
				static const Dimension padding = {0, 0};
 
				w->UpdateWidgetSize(this->index, &d, padding, &resize);
 
				w->UpdateWidgetSize(this->index, &d, padding, &fill, &resize);
 
			}
 
		}
 
		this->smallest_x = d.width;
 
		this->smallest_y = d.height;
 
		this->fill_x = fill.width;
 
		this->fill_y = fill.height;
 
		this->resize_x = resize.width;
 
		this->resize_y = resize.height;
 
	}
 
@@ -1744,6 +1747,7 @@ void NWidgetLeaf::SetupSmallestSize(Wind
 

	
 
	/* A non-NULL window pointer acts as switch to turn dynamic widget sizing on. */
 
	Dimension size = {this->min_x, this->min_y};
 
	Dimension fill = {this->fill_x, this->fill_y};
 
	Dimension resize = {this->resize_x, this->resize_y};
 
	/* Get padding, and update size with the real content size if appropriate. */
 
	const Dimension *padding = NULL;
 
@@ -1869,13 +1873,14 @@ void NWidgetLeaf::SetupSmallestSize(Wind
 
			NOT_REACHED();
 
	}
 

	
 
	if (this->index >= 0) w->UpdateWidgetSize(this->index, &size, *padding, &resize);
 
	if (this->index >= 0) w->UpdateWidgetSize(this->index, &size, *padding, &fill, &resize);
 

	
 
	this->smallest_x = size.width;
 
	this->smallest_y = size.height;
 
	this->fill_x = fill.width;
 
	this->fill_y = fill.height;
 
	this->resize_x = resize.width;
 
	this->resize_y = resize.height;
 
	/* this->fill_x and this->fill_y are already correct. */
 
}
 

	
 
void NWidgetLeaf::Draw(const Window *w)
src/window_gui.h
Show inline comments
 
@@ -577,9 +577,10 @@ public:
 
	 * @param widget  Widget number.
 
	 * @param size    Size of the widget.
 
	 * @param padding Recommended amount of space between the widget content and the widget edge.
 
	 * @param fill    Fill step of the widget.
 
	 * @param resize  Resize step of the widget.
 
	 */
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize) {}
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) {}
 

	
 
	/**
 
	 * Initialize string parameters for a widget.
0 comments (0 inline, 0 general)