diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-04 23:04:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-04 23:04:04 +0300 |
commit | 80df65d59f5c19335793db2f5689b225a667bf09 (patch) | |
tree | 60caa56df7180f72b672d35464193df543531f08 /src/gui/widgets | |
parent | 92b06e397e5d18b24584dfaf5869929a9579b314 (diff) | |
download | plus-80df65d59f5c19335793db2f5689b225a667bf09.tar.gz plus-80df65d59f5c19335793db2f5689b225a667bf09.tar.bz2 plus-80df65d59f5c19335793db2f5689b225a667bf09.tar.xz plus-80df65d59f5c19335793db2f5689b225a667bf09.zip |
Fix label position in tab.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tab.cpp | 12 |
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() |