Bug 165274

Summary: KActionMenu does not align properly in vertically orientated toolbar
Product: [Unmaintained] kdelibs Reporter: Diederik van der Boor <vdboor>
Component: qtAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, artjom.simon, cfeck, kde-2011.08
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Diederik van der Boor 2008-06-29 08:25:55 UTC
Version:            (using KDE 4.0.83)
Installed from:    SuSE RPMs

When a toolbar is placed in a vertical orientation, all items are centered except a KActionMenu.

This is seen the following bug report:
http://www.kmess.org/board/viewtopic.php?f=4&t=3237
Comment 1 Valerio Pilo 2008-06-29 12:44:39 UTC
I can confirm this behavior on other KDE4 apps.

On Konqueror, edit your main toolbar (the one with the back/forward KActionMenus) to also display the "Activate tab 1" label (which is a large enough text to make the toolbar to resize when it's placed vertically), and then move it to the left or right side.
Comment 2 Tobias Koenig 2008-07-01 23:47:29 UTC
On Sun, Jun 29, 2008 at 10:44:40AM -0000, Valerio Pilo wrote:
Hej,

> I can confirm this behavior on other KDE4 apps.

I can reproduce that bug with a Qt only application as well.
All actions inherited from QWidgetAction suffer of that behaviour.
I've already written a test case for that and sent it to Trolltech.

Ciao,
Tobias
Comment 3 Tobias Koenig 2008-07-02 16:32:23 UTC
On Tue, Jul 01, 2008 at 09:47:30PM -0000, Tobias Koenig wrote:
Hej,

> I've already written a test case for that and sent it to Trolltech.

Link is
  http://www.trolltech.com/developer/task-tracker/index_html?id=218054&method=entry

Ciao,
Tobias
Comment 4 Christoph Feck 2009-03-25 08:35:36 UTC
*** Bug 187474 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2009-12-31 14:20:05 UTC
*** Bug 220779 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2009-12-31 14:25:20 UTC
http://bugreports.qt.nokia.com/browse/QTBUG-2376

Looks like Nokia has no interest to change this, because it "has been like that for a long time".
Comment 7 Albert Astals Cid 2010-01-22 00:11:57 UTC
Could/Should we workaround this? Given Nokia decision to have their product broken?
Comment 8 Christoph Feck 2010-01-22 00:48:24 UTC
A workaround would be to create a protected member function that creates a widget with the centered layout, so derived classes can be adapted easily.
Comment 9 Albert Astals Cid 2010-01-23 01:38:35 UTC
Any idea for the name, my current implementation is 
  QWidget *KAction::fixQtBug(QWidget *w) const
that is not really a good name :D
Comment 10 Albert Astals Cid 2010-01-23 22:14:12 UTC
SVN commit 1079215 by aacid:

Center widget actions to follow what non widget actions do
This should be fixed in Qt but they refused shielding in "it has been broken forever"
so we are fixing it in KDE
As it is a somewhat dangerous change i'm only doing it for KDE 4.5 so we have time to
evaluate if it breaks something
BUGS: 165274


 M  +18 -0     kaction.cpp  
 M  +7 -0      kaction.h  
 M  +1 -1      kactionmenu.cpp  
 M  +1 -1      kselectaction.cpp  
 M  +1 -1      ktoolbarpopupaction.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1079215
Comment 11 Albert Astals Cid 2010-01-24 03:18:01 UTC
Sorry but i had to revert my changes since they were not ok, i'm again putting this to upstream as it really needs to be fixed in Qt
Comment 12 Albert Astals Cid 2010-01-24 04:03:43 UTC
SVN commit 1079319 by aacid:

When actions are added, see if they are a widget action and in case the widget
has no use for more space center it like other non widget items are
A different and less hacky way to fix bug 165274
CCMAIL: christoph@maxiom.de
BUGS: 165274


 M  +7 -0      ktoolbar.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1079319