summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/popup.cpp4
-rw-r--r--src/gui/skin.cpp4
-rw-r--r--src/gui/skin.h4
-rw-r--r--src/gui/window.cpp5
4 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/popup.cpp b/src/gui/popup.cpp
index 8e0c8fb9..17d299a5 100644
--- a/src/gui/popup.cpp
+++ b/src/gui/popup.cpp
@@ -172,12 +172,12 @@ void Popup::setLocationRelativeTo(gcn::Widget *widget)
void Popup::setMinWidth(unsigned int width)
{
- mMinWidth = width;
+ mMinWidth = width > mSkin->getMinWidth() ? width : mSkin->getMinWidth();
}
void Popup::setMinHeight(unsigned int height)
{
- mMinHeight = height;
+ mMinHeight = height > mSkin->getMinHeight() ? height : mSkin->getMinHeight();
}
void Popup::setMaxWidth(unsigned int width)
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 8787770c..d44c54a8 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -51,13 +51,13 @@ Skin::~Skin()
closeImage->decRef();
}
-int Skin::getMinWidth()
+unsigned int Skin::getMinWidth()
{
return (border.grid[0]->getWidth() + border.grid[1]->getWidth()) +
border.grid[2]->getWidth();
}
-int Skin::getMinHeight()
+unsigned int Skin::getMinHeight()
{
return (border.grid[0]->getHeight() + border.grid[3]->getHeight()) +
border.grid[6]->getHeight();
diff --git a/src/gui/skin.h b/src/gui/skin.h
index b7e70330..b8a1242e 100644
--- a/src/gui/skin.h
+++ b/src/gui/skin.h
@@ -60,12 +60,12 @@ class Skin
/**
* Returns the minimum width which can be used with this skin.
*/
- int getMinWidth();
+ unsigned int getMinWidth();
/**
* Returns the minimum height which can be used with this skin.
*/
- int getMinHeight();
+ unsigned int getMinHeight();
int instances;
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 5c01daf3..d40ebca6 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -255,12 +255,13 @@ void Window::setLocationRelativeTo(ImageRect::ImagePosition position,
void Window::setMinWidth(unsigned int width)
{
- mMinWinWidth = width;
+ mMinWinWidth = width > mSkin->getMinWidth() ? width : mSkin->getMinWidth();
}
void Window::setMinHeight(unsigned int height)
{
- mMinWinHeight = height;
+ mMinWinHeight = height > mSkin->getMinHeight() ?
+ height : mSkin->getMinHeight();
}
void Window::setMaxWidth(unsigned int width)