Changeset - r20884:503137a5952a
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-10-28 13:04:34
frosch@openttd.org
(svn r25928) -Fix [FS#5733]: Reserve enough space for two digits of signal density. (adf88)
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -1514,7 +1514,10 @@ public:
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		if (IsInsideMM(widget, WID_BS_SEMAPHORE_NORM, WID_BS_ELECTRIC_PBS_OWAY + 1)) {
 
		if (widget == WID_BS_DRAG_SIGNALS_DENSITY_LABEL) {
 
			/* Two digits for signals density. */
 
			size->width = max(size->width, 2 * GetDigitWidth() + padding.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT);
 
		} else if (IsInsideMM(widget, WID_BS_SEMAPHORE_NORM, WID_BS_ELECTRIC_PBS_OWAY + 1)) {
 
			size->width = max(size->width, this->sig_sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT);
 
			size->height = max(size->height, this->sig_sprite_size.height + WD_IMGBTN_TOP + WD_IMGBTN_BOTTOM);
 
		}
0 comments (0 inline, 0 general)