User:Freeyorp/Patches/Modify PartyWindow Sizing Again/: Difference between revisions
From The Mana World
New page: <pre> From a73b6f614b4fbe33be212c23bf24e5a74c9d7ae3 Mon Sep 17 00:00:00 2001 From: Freeyorp <Freeyorp101@NOSPAM@hotmail.com> Date: Thu, 14 May 2009 00:38:08 +1200 Subject: [PATCH] Modify P... |
pushed |
||
| Line 1: | Line 1: | ||
Pushed as [http://gitorious.org/tmw/mainline/commit/639260f2e7cccee8092c6ba51db8f1a6e7152fa4 639260f2e7cccee8092c6ba51db8f1a6e7152fa4] | |||
<pre> | <pre> | ||
From a73b6f614b4fbe33be212c23bf24e5a74c9d7ae3 Mon Sep 17 00:00:00 2001 | From a73b6f614b4fbe33be212c23bf24e5a74c9d7ae3 Mon Sep 17 00:00:00 2001 | ||
Latest revision as of 13:52, 13 May 2009
Pushed as 639260f2e7cccee8092c6ba51db8f1a6e7152fa4
From a73b6f614b4fbe33be212c23bf24e5a74c9d7ae3 Mon Sep 17 00:00:00 2001
From: Freeyorp <Freeyorp101@NOSPAM@hotmail.com>
Date: Thu, 14 May 2009 00:38:08 +1200
Subject: [PATCH] Modify PartyWindow sizing again
Rather than expanding PartyWindow again, call mLabel->adjustSize(); and let players resize the window if they need to.
Also shrink the minimum size of the PartyWindow.
---
src/gui/partywindow.cpp | 4 ++--
src/gui/widgets/avatar.cpp | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index 8958c1e..fdfe5a5 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -53,9 +53,9 @@ PartyWindow::PartyWindow() :
setResizable(true);
setSaveVisible(true);
setCloseButton(true);
- setMinWidth(212);
+ setMinWidth(120);
setMinHeight(200);
- setDefaultSize(590, 200, 212, 200);
+ setDefaultSize(590, 200, 120, 200);
loadWindowState();
}
diff --git a/src/gui/widgets/avatar.cpp b/src/gui/widgets/avatar.cpp
index 911fb7a..0bbdc46 100644
--- a/src/gui/widgets/avatar.cpp
+++ b/src/gui/widgets/avatar.cpp
@@ -42,7 +42,7 @@ Avatar::Avatar():
mMaxHp(0)
{
setOpaque(false);
- setSize(212, 12);
+ setSize(250, 12);
if (avatarCount == 0)
{
@@ -58,7 +58,7 @@ Avatar::Avatar():
mStatus->setSize(12, 12);
add(mStatus, 1, 0);
mLabel = new Label;
- mLabel->setSize(186, 12);
+ mLabel->adjustSize();
add(mLabel, 16, 0);
}
@@ -108,4 +108,5 @@ void Avatar::updateAvatarLabel()
ss << " (" << mHp << "/" << mMaxHp << ")";
mLabel->setCaption(ss.str());
+ mLabel->adjustSize();
}
--
1.6.0.4