adjust the alignment even where there is only th icon on the left but no buttons on the right

svn path=/trunk/KDE/kdelibs/; revision=1185142
This commit is contained in:
Marco Martin 2010-10-12 10:44:59 +00:00
parent dd0045eadc
commit 132719558d

View File

@ -973,6 +973,15 @@ void ExtenderItemPrivate::updateToolBox()
//to keep the text really centered
toolboxLayout->setItemSpacing(0, KIconLoader::SizeSmall * (lastIndex - 2));
if (lastIndex == 2) {
if (QApplication::layoutDirection() == Qt::RightToLeft) {
toolboxLayout->setContentsMargins(KIconLoader::SizeSmall, 0, 0, 0);
} else {
toolboxLayout->setContentsMargins(0, 0, KIconLoader::SizeSmall, 0);
}
} else {
toolboxLayout->setContentsMargins(0, 0, 0, 0);
}
}
Applet *ExtenderItemPrivate::hostApplet() const