From ebd24adaffb6794754be4693629441a32ef60b30 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 1 Aug 2009 10:06:52 +0000 Subject: (svn r17017) -Fix (r17008): Setup padding for WWT_MATRIX. --- src/widget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2