summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 3c73a586..5253dd2e 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -196,9 +196,13 @@ void Window::setContentSize(int width, int height)
width = width + 2 * getPadding();
height = height + getPadding() + getTitleBarHeight();
- if (getMaxWidth() < width)
+ if (getMinWidth() > width)
+ width = getMinWidth();
+ else if (getMaxWidth() < width)
width = getMaxWidth();
- if (getMaxHeight() < height)
+ if (getMinHeight() > height)
+ height = getMinHeight();
+ else if (getMaxHeight() < height)
height = getMaxHeight();
setSize(width, height);