diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/minimap.cpp | 1 | ||||
-rw-r--r-- | src/gui/window.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index ecda29ce..f3da52c6 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -80,7 +80,6 @@ void Minimap::setMapImage(Image *img) mMapImage->getWidth() + offsetX : titleWidth); setMaxHeight(mMapImage->getHeight() + offsetY); - setContentSize(getWidth() - offsetX, getHeight() - offsetY); setDefaultSize(getX(), getY(), getWidth(), getHeight()); resetToDefaultSize(); 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); |