Changeset - r21711:b723ebbe8cce
[Not reviewed]
master
0 1 0
peter1138 - 10 years ago 2014-09-20 00:27:14
peter1138@openttd.org
(svn r26854) -Codechange: Don't override computed minimal size with static minimal size, instead only increase it.
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -805,8 +805,8 @@ NWidgetResizeBase::NWidgetResizeBase(Wid
 
 */
 
void NWidgetResizeBase::SetMinimalSize(uint min_x, uint min_y)
 
{
 
	this->min_x = min_x;
 
	this->min_y = min_y;
 
	this->min_x = max(this->min_x, min_x);
 
	this->min_y = max(this->min_y, min_y);
 
}
 

	
 
/**
 
@@ -2100,7 +2100,8 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, 
 
{
 
	assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT || tp == WWT_CAPTION || tp == WWT_RESIZEBOX || tp == WWT_SHADEBOX || tp == WWT_DEFSIZEBOX || tp == WWT_DEBUGBOX || tp == WWT_STICKYBOX || tp == WWT_CLOSEBOX);
 
	if (index >= 0) this->SetIndex(index);
 
	this->SetMinimalSize(0, 0);
 
	this->min_x = 0;
 
	this->min_y = 0;
 
	this->SetResize(0, 0);
 

	
 
	switch (tp) {
0 comments (0 inline, 0 general)