summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatar.cpp13
-rw-r--r--src/gui/widgets/chattab.cpp7
-rw-r--r--src/gui/widgets/dropdown.cpp6
3 files changed, 12 insertions, 14 deletions
diff --git a/src/gui/widgets/avatar.cpp b/src/gui/widgets/avatar.cpp
index b120c51f..16c77233 100644
--- a/src/gui/widgets/avatar.cpp
+++ b/src/gui/widgets/avatar.cpp
@@ -42,7 +42,6 @@ Avatar::Avatar():
mMaxHp(0)
{
setOpaque(false);
- setSize(200, 12);
if (avatarCount == 0)
{
@@ -54,12 +53,17 @@ Avatar::Avatar():
avatarStatusOffline->incRef();
avatarStatusOnline->incRef();
+ mLabel = new Label;
+ mLabel->adjustSize();
+
mStatus = new Icon(avatarStatusOffline);
mStatus->setSize(12, 12);
- add(mStatus, 1, 0);
- mLabel = new Label;
- mLabel->setSize(174, 12);
+
+ add(mStatus, 1, (mLabel->getHeight() - 12) / 2);
add(mLabel, 16, 0);
+
+ setSize(250, mLabel->getHeight());
+
}
Avatar::~Avatar()
@@ -108,4 +112,5 @@ void Avatar::updateAvatarLabel()
ss << " (" << mHp << "/" << mMaxHp << ")";
mLabel->setCaption(ss.str());
+ mLabel->adjustSize();
}
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index defc06f0..711680d1 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -162,13 +162,6 @@ void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
lineColor = "##S";
}
-#ifdef EATHENA_SUPPORT
- if (tmp.nick.empty() && tmp.text.substr(0, 17) == "Visible GM status")
- {
- player_node->setGM(true);
- }
-#endif
-
// Get the current system time
time_t t;
time(&t);
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 491e6396..e838aab6 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -140,15 +140,15 @@ void DropDown::draw(gcn::Graphics* graphics)
const int alpha = (int) (mAlpha * 255.0f);
gcn::Color faceColor = getBaseColor();
faceColor.a = alpha;
- const gcn::Color* highlightColor = &guiPalette->getColor(Palette::HIGHLIGHT,
- alpha);
+ const gcn::Color *highlightColor =
+ &guiPalette->getColor(Palette::HIGHLIGHT, alpha);
gcn::Color shadowColor = faceColor - 0x303030;
shadowColor.a = alpha;
if (mListBox->getListModel() && mListBox->getSelected() >= 0)
{
graphics->setFont(getFont());
- graphics->setColor(guiPalette->getColor(Palette::TEXT, alpha));
+ graphics->setColor(guiPalette->getColor(Palette::TEXT));
graphics->drawText(mListBox->getListModel()->getElementAt(mListBox->getSelected()), 1, 0);
}