Changeset - r16280:cc4f24443d19
[Not reviewed]
master
0 6 0
planetmaker - 14 years ago 2010-10-19 21:48:20
planetmaker@openttd.org
(svn r20997) -Fix: Size of sort buttons for order and vehicle list gui could be too small
6 files changed with 20 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/bridge_gui.cpp
Show inline comments
 
@@ -169,7 +169,7 @@ public:
 
		switch (widget) {
 
			case BBSW_DROPDOWN_ORDER: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
src/group_gui.cpp
Show inline comments
 
@@ -231,6 +231,14 @@ public:
 
				size->width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT + 8 + 8;
 
				break;
 

	
 
			case GRP_WIDGET_SORT_BY_ORDER: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
 
			}
 

	
 
			case GRP_WIDGET_LIST_VEHICLE:
 
				resize->height = GetVehicleListHeight(this->vli.vtype, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP);
 
				size->height = 4 * resize->height;
src/industry_gui.cpp
Show inline comments
 
@@ -1267,7 +1267,7 @@ public:
 
		switch (widget) {
 
			case IDW_DROPDOWN_ORDER: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
src/station_gui.cpp
Show inline comments
 
@@ -379,7 +379,7 @@ public:
 
		switch (widget) {
 
			case SLW_SORTBY: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
src/town_gui.cpp
Show inline comments
 
@@ -784,7 +784,7 @@ public:
 
			case TDW_SORTNAME:
 
			case TDW_SORTPOPULATION: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the word is centered, also looks nice.
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
src/vehicle_gui.cpp
Show inline comments
 
@@ -1171,6 +1171,14 @@ public:
 
				}
 
				break;
 

	
 
			case VLW_WIDGET_SORT_ORDER: {
 
				Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
 
				d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
				break;
 
			}
 

	
 
			case VLW_WIDGET_MANAGE_VEHICLES_DROPDOWN: {
 
				Dimension d = this->GetActionDropdownSize(this->vli.type == VL_STANDARD, false);
 
				d.height += padding.height;
0 comments (0 inline, 0 general)