summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-06-07 14:34:43 +0000
committeralberth <alberth@openttd.org>2009-06-07 14:34:43 +0000
commite3ba9c487f98acf50922cda8ae7e7c1e118628e2 (patch)
treeea9cd6827a2939096e6b9104be09cd02939f643a /src
parent726ba5086887306ca20561fee968be7777c282ce (diff)
downloadopenttd-e3ba9c487f98acf50922cda8ae7e7c1e118628e2.tar.xz
(svn r16530) -Fix [FS#2964], (r16501): Deduct additional widget length given away to a child from the total (Hirundo).
Diffstat (limited to 'src')
-rw-r--r--src/widget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 0f2004a6c..516f6b04c 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1428,6 +1428,7 @@ void NWidgetHorizontal::AssignSizePosition(SizingType sizing, uint x, uint y, ui
num_changing_childs--;
if (hor_step > 1) increment -= increment % hor_step;
child_wid->current_x = child_wid->smallest_x + increment;
+ additional_length -= increment;
continue;
}
next_biggest_stepsize = max(next_biggest_stepsize, hor_step);
@@ -1560,6 +1561,7 @@ void NWidgetVertical::AssignSizePosition(SizingType sizing, uint x, uint y, uint
num_changing_childs--;
if (vert_step > 1) increment -= increment % vert_step;
child_wid->current_y = child_wid->smallest_y + increment;
+ additional_length -= increment;
continue;
}
next_biggest_stepsize = max(next_biggest_stepsize, vert_step);