summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-04 23:04:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-04 23:04:04 +0300
commit80df65d59f5c19335793db2f5689b225a667bf09 (patch)
tree60caa56df7180f72b672d35464193df543531f08 /src/gui/widgets
parent92b06e397e5d18b24584dfaf5869929a9579b314 (diff)
downloadmanaverse-80df65d59f5c19335793db2f5689b225a667bf09.tar.gz
manaverse-80df65d59f5c19335793db2f5689b225a667bf09.tar.bz2
manaverse-80df65d59f5c19335793db2f5689b225a667bf09.tar.xz
manaverse-80df65d59f5c19335793db2f5689b225a667bf09.zip
Fix label position in tab.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tab.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 1f3d71192..c70d15850 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -104,9 +104,6 @@ Tab::~Tab()
void Tab::init()
{
- mLabel->setPosition(4, 4);
- add(mLabel);
-
addMouseListener(this);
setFocusable(false);
setFrameSize(0);
@@ -126,6 +123,15 @@ void Tab::init()
updateAlpha();
}
mInstances++;
+
+ add(mLabel);
+
+ const Skin *const skin = tabImg[TAB_STANDARD];
+ if (!skin)
+ return;
+ const int padding = skin->getPadding();
+
+ mLabel->setPosition(padding, padding);
}
void Tab::updateAlpha()