Changeset - r22382:2fb5fdebf2bb
[Not reviewed]
master
0 4 0
frosch - 9 years ago 2016-05-22 10:52:02
frosch@openttd.org
(svn r27577) -Fix [FS#6386]: Dock and roadstop picker, client list and town authority window did not auto-resize according to their content when they were positioned at the bottom of the screen. (Eearslya)
4 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/dock_gui.cpp
Show inline comments
 
@@ -433,7 +433,7 @@ public:
 
		 * Never make the window smaller to avoid oscillating if the size change affects the acceptance.
 
		 * (This is the case, if making the window bigger moves the mouse into the window.) */
 
		if (top > bottom) {
 
			ResizeWindow(this, 0, top - bottom);
 
			ResizeWindow(this, 0, top - bottom, false);
 
		}
 
	}
 

	
src/network/network_gui.cpp
Show inline comments
 
@@ -1892,7 +1892,7 @@ struct NetworkClientListWindow : Window 
 
		int diff = (num + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM) - (this->GetWidget<NWidgetBase>(WID_CL_PANEL)->current_y);
 
		/* If height is changed */
 
		if (diff != 0) {
 
			ResizeWindow(this, 0, diff);
 
			ResizeWindow(this, 0, diff, false);
 
			return false;
 
		}
 
		return true;
src/road_gui.cpp
Show inline comments
 
@@ -1002,7 +1002,7 @@ struct BuildRoadStationWindow : public P
 
		 * Never make the window smaller to avoid oscillating if the size change affects the acceptance.
 
		 * (This is the case, if making the window bigger moves the mouse into the window.) */
 
		if (top > bottom) {
 
			ResizeWindow(this, 0, top - bottom);
 
			ResizeWindow(this, 0, top - bottom, false);
 
		}
 
	}
 

	
src/town_gui.cpp
Show inline comments
 
@@ -177,7 +177,7 @@ public:
 
		y = y + WD_FRAMERECT_BOTTOM - nwid->pos_y; // Compute needed size of the widget.
 
		if (y > nwid->current_y) {
 
			/* If the company list is too big to fit, mark ourself dirty and draw again. */
 
			ResizeWindow(this, 0, y - nwid->current_y);
 
			ResizeWindow(this, 0, y - nwid->current_y, false);
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)