diff options
-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() |