diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-10 08:43:26 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-10 08:43:26 -0600 |
commit | 1570fb33d5909786ef2997246ada7c46dd6de9e4 (patch) | |
tree | 0f0f70097de966fbec38a6062afa592e10bd2912 /src | |
parent | 6b0659b6cc921aa6589681820b431af44f458440 (diff) | |
download | mana-1570fb33d5909786ef2997246ada7c46dd6de9e4.tar.gz mana-1570fb33d5909786ef2997246ada7c46dd6de9e4.tar.bz2 mana-1570fb33d5909786ef2997246ada7c46dd6de9e4.tar.xz mana-1570fb33d5909786ef2997246ada7c46dd6de9e4.zip |
Reverted last commit (since I confused it with something else) as well
as removed a redundant call for sizing in the minimap class.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-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); |