From 80df65d59f5c19335793db2f5689b225a667bf09 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 May 2013 23:04:04 +0300 Subject: Fix label position in tab. --- src/gui/widgets/tab.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets') 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() -- cgit v1.2.3-70-g09d2