summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 92a6443be..ff62b0155 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -48,7 +48,8 @@ AvatarListBox::AvatarListBox(const Widget2 *const widget,
ListBox(widget, model, "avatarlistbox.xml"),
mShowGender(config.getBoolValue("showgender")),
mShowLevel(config.getBoolValue("showlevel")),
- mHighlightColor(getThemeColor(Theme::HIGHLIGHT))
+ mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
+ mImagePadding(mSkin ? mSkin->getOption("imagePadding") : 0)
{
instances++;
@@ -127,7 +128,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
const Image *const icon = a->getOnline()
? onlineIcon : offlineIcon;
if (icon)
- graphics->drawImage(icon, mPadding, y + mPadding);
+ graphics->drawImage(icon, mImagePadding, y + mPadding);
}
std::string text;
@@ -268,20 +269,20 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
{
if (a->getType() == MapItem::SEPARATOR)
{
- boldFont->drawString(graphics, text, mPadding, y + mPadding);
+ boldFont->drawString(graphics, text, mImagePadding + mPadding, y + mPadding);
}
else
{
boldFont->drawString(graphics, text,
- 15 + mPadding, y + mPadding);
+ 15 + mImagePadding + mPadding, y + mPadding);
}
}
else
{
if (a->getType() == MapItem::SEPARATOR)
- font->drawString(graphics, text, mPadding, y + mPadding);
+ font->drawString(graphics, text, mImagePadding + mPadding, y + mPadding);
else
- font->drawString(graphics, text, 15 + mPadding, y + mPadding);
+ font->drawString(graphics, text, 15 + mImagePadding + mPadding, y + mPadding);
}
}