Changeset - r13329:a4e6e64eb736
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-10-23 21:10:24
rubidium@openttd.org
(svn r17848) -Codechange: allow overriding (some) settings of STACKED_SELECTION_ZERO_SIZE widgets via UpdateWidgetSize
1 file changed with 11 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -1291,12 +1291,19 @@ void NWidgetStacked::SetupSmallestSize(W
 

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

	
 
		Dimension size = {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);
 

	
 
		this->smallest_x = size.width;
 
		this->smallest_y = size.height;
 
		this->resize_x = resize.width;
 
		this->resize_y = resize.height;
 
		return;
 
	}
 

	
0 comments (0 inline, 0 general)