From 7be090da649e2489827f1398cd71f8ce98c69f21 Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Sat, 14 Feb 2009 17:32:55 +0000 Subject: [PATCH] Make tools use all the available width This patch makes each tool (action) inside a toolbox use all the width available, giving a better UI effect. Before, each tool had it's own width, giving a sensation of 'mess' =). svn path=/trunk/KDE/kdelibs/; revision=926122 --- private/desktoptoolbox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index 20be618c3..1555aa206 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -422,10 +422,8 @@ void DesktopToolBox::showToolBox() icon->action() == d->containment->action("add sibling containment") || icon->action() == d->containment->action("add widgets"))) { icon->setText(icon->action()->text()); - icon->resize(icon->sizeFromIconSize(22)); } else { icon->setText(QString()); - icon->resize(icon->sizeFromIconSize(22)); } } @@ -504,6 +502,9 @@ void DesktopToolBox::showToolBox() continue; } + Plasma::IconWidget *icon = qgraphicsitem_cast(tool); + icon->resize(maxWidth, icon->sizeFromIconSize(22).height()); + if (tool->isEnabled()) { if (isToolbar()) { //kDebug() << tool << "is enabled";