Bug 128622 - Menu arrows invisible or misplaced in vertical panels
Summary: Menu arrows invisible or misplaced in vertical panels
Status: RESOLVED FIXED
Alias: None
Product: kicker
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Aaron J. Seigo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-04 16:11 UTC by Maxilys
Modified: 2006-06-05 16:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for kicker/libkicker/panelbutton.cpp (821 bytes, text/plain)
2006-06-04 16:19 UTC, Maxilys
Details
Bugfree patch for kicker/libkicker/panelbutton.cpp (829 bytes, patch)
2006-06-04 18:58 UTC, Maxilys
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxilys 2006-06-04 16:11:59 UTC
Version:           3.5.2 (using KDE 3.5.3 Level "a" , unofficial build of SUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.13-4-default

I have a panel on the left with quick browsers (i.e. icons with popup menus). No arrow ever appears.

If I put the panel on the right of the screen, the arrows appear centered above the icons.

I looked at the sources and I saw that the arrow is moved out of icon rectangle when the panel is on the left and not moved at all when the panel is on the right. The result is what I get.

By the way, to center the arrow is nice but I don't think that to make them appear/disappear was such a good idea. I miss them.
Comment 1 Maxilys 2006-06-04 16:19:34 UTC
Created attachment 16471 [details]
Patch for kicker/libkicker/panelbutton.cpp

Since the menu arrows are now centered, this patch sets them so whatever side
the popup must appear.
Comment 2 Maxilys 2006-06-04 18:58:21 UTC
Created attachment 16477 [details]
Bugfree patch for kicker/libkicker/panelbutton.cpp

Oops! I was already compiling KDElibs and I couldn't test what I was writing.
Now, I'm sure it works as I can see on my screen.
Comment 3 Aaron J. Seigo 2006-06-05 16:49:24 UTC
SVN commit 548428 by aseigo:

fix arrow locations on vert panels
patch by Maxilys <maxilys@tele2.fr>
BUGS:128622,128561


 M  +8 -3      panelbutton.cpp  


--- branches/KDE/3.5/kdebase/kicker/libkicker/panelbutton.cpp #548427:548428
@@ -631,7 +631,8 @@
     if (m_drawArrow && (m_highlight || active))
     {
         QStyle::PrimitiveElement e = QStyle::PE_ArrowUp;
-        QRect r(width() / 2 - 4, 0, 8, 8);
+        int arrowSize = style().pixelMetric(QStyle::PM_MenuButtonIndicator);
+        QRect r((width() - arrowSize)/2, 0, arrowSize, arrowSize);
 
         switch (m_arrowDirection)
         {
@@ -640,27 +641,31 @@
                 break;
             case KPanelExtension::Bottom:
                 e = QStyle::PE_ArrowDown;
-                r.moveBy(0, height() - 8);
+                r.moveBy(0, height() - arrowSize);
                 break;
             case KPanelExtension::Right:
                 e = QStyle::PE_ArrowRight;
-                r.moveBy(width() - 8 , 0);
+                r = QRect(width() - arrowSize, (height() - arrowSize)/2, arrowSize, arrowSize);
                 break;
             case KPanelExtension::Left:
                 e = QStyle::PE_ArrowLeft;
+                r = QRect(0, (height() - arrowSize)/2, arrowSize, arrowSize);
                 break;
             case KPanelExtension::Floating:
                 if (orientation() == Horizontal)
                 {
                     e = QStyle::PE_ArrowDown;
+                    r.moveBy(0, height() - arrowSize);
                 }
                 else if (QApplication::reverseLayout())
                 {
                     e = QStyle::PE_ArrowLeft;
+                    r = QRect(0, (height() - arrowSize)/2, arrowSize, arrowSize);
                 }
                 else
                 {
                     e = QStyle::PE_ArrowRight;
+                    r = QRect(width() - arrowSize, (height() - arrowSize)/2, arrowSize, arrowSize);
                 }
                 break;
         }