From 6b0659b6cc921aa6589681820b431af44f458440 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 10 Mar 2009 08:37:10 -0600 Subject: 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 --- src/gui/window.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gui/window.cpp') 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); -- cgit v1.2.3-70-g09d2