summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/gui/window.cpp15
2 files changed, 10 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c275e67..8d768afd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-25 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/window.cpp: Added window resize patch by peoro.
+
2006-03-21 Eugenio Favalli <elvenprogrammer@gmail.com>
* The Mana World.dev: Updated project.
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 492fe292..974a1d73 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -63,8 +63,8 @@ Window::Window(const std::string& caption, bool modal, Window *parent):
mModal(modal),
mResizable(false),
mMouseResize(false),
- mMinWinWidth(6),
- mMinWinHeight(23),
+ mMinWinWidth(100),
+ mMinWinHeight(28),
mMaxWinWidth(INT_MAX),
mMaxWinHeight(INT_MAX)
{
@@ -341,25 +341,22 @@ void Window::mouseMotion(int x, int y)
}
// Keep the window at least its minimum size
- int Xcorrection = 0;
- int Ycorrection = 0;
-
if (newDim.width < mMinWinWidth)
{
- Xcorrection = mMinWinWidth - newDim.width;
+ newDim.width = mMinWinWidth;
}
else if (newDim.width > mMaxWinWidth)
{
- Xcorrection = mMaxWinWidth - newDim.width;
+ newDim.width = mMaxWinWidth;
}
if (newDim.height < mMinWinHeight)
{
- Ycorrection = mMinWinHeight - newDim.height;
+ newDim.height = mMinWinHeight;
}
else if (newDim.height > mMaxWinHeight)
{
- Ycorrection = mMaxWinHeight - newDim.height;
+ newDim.height = mMaxWinHeight;
}
// Snap window to edges