summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-10 08:37:10 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 08:37:10 -0600
commit6b0659b6cc921aa6589681820b431af44f458440 (patch)
tree328a65ff5b2b5fa255e407f84adc774e8369d3c3 /src/gui/window.cpp
parent49fa807c986283191e72a403d4fbbad8dd094dee (diff)
downloadmana-client-6b0659b6cc921aa6589681820b431af44f458440.tar.gz
mana-client-6b0659b6cc921aa6589681820b431af44f458440.tar.bz2
mana-client-6b0659b6cc921aa6589681820b431af44f458440.tar.xz
mana-client-6b0659b6cc921aa6589681820b431af44f458440.zip
Fixed setContentSize in the window class to only care about exceeding
the maximum width and height. Exceeding the minumum width and height is a desireable case in some situations. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 5253dd2e..3c73a586 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -196,13 +196,9 @@ void Window::setContentSize(int width, int height)
width = width + 2 * getPadding();
height = height + getPadding() + getTitleBarHeight();
- if (getMinWidth() > width)
- width = getMinWidth();
- else if (getMaxWidth() < width)
+ if (getMaxWidth() < width)
width = getMaxWidth();
- if (getMinHeight() > height)
- height = getMinHeight();
- else if (getMaxHeight() < height)
+ if (getMaxHeight() < height)
height = getMaxHeight();
setSize(width, height);