summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-08-01 10:06:52 +0000
committeralberth <alberth@openttd.org>2009-08-01 10:06:52 +0000
commitebd24adaffb6794754be4693629441a32ef60b30 (patch)
tree74865df13722a730ca99959cd14257242f514471
parentfc03fef4aee9b069bf4f1e8c2109d127246a973a (diff)
downloadopenttd-ebd24adaffb6794754be4693629441a32ef60b30.tar.xz
(svn r17017) -Fix (r17008): Setup padding for WWT_MATRIX.
-rw-r--r--src/widget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 0f8aec3de..7cf66439b 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1980,7 +1980,6 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
const Dimension *padding = NULL;
switch (this->type) {
case WWT_EMPTY:
- case WWT_MATRIX:
case WWT_SCROLLBAR:
case WWT_SCROLL2BAR:
case WWT_HSCROLLBAR: {
@@ -1988,6 +1987,11 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
padding = &extra;
break;
}
+ case WWT_MATRIX: {
+ static const Dimension extra = {WD_MATRIX_LEFT + WD_MATRIX_RIGHT, WD_MATRIX_TOP + WD_MATRIX_BOTTOM};
+ padding = &extra;
+ break;
+ }
case WWT_STICKYBOX: {
static const Dimension extra = {WD_STICKYBOX_LEFT + WD_STICKYBOX_RIGHT, WD_STICKYBOX_TOP + WD_STICKYBOX_BOTTOM};
padding = &extra;