diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-10 08:37:10 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-10 08:37:10 -0600 |
commit | 6b0659b6cc921aa6589681820b431af44f458440 (patch) | |
tree | 328a65ff5b2b5fa255e407f84adc774e8369d3c3 /src | |
parent | 49fa807c986283191e72a403d4fbbad8dd094dee (diff) | |
download | mana-6b0659b6cc921aa6589681820b431af44f458440.tar.gz mana-6b0659b6cc921aa6589681820b431af44f458440.tar.bz2 mana-6b0659b6cc921aa6589681820b431af44f458440.tar.xz mana-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')
-rw-r--r-- | src/gui/window.cpp | 8 |
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); |