Summary: | Menu arrows invisible or misplaced in vertical panels | ||
---|---|---|---|
Product: | [Unmaintained] kicker | Reporter: | Maxilys <maxilys> |
Component: | general | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Patch for kicker/libkicker/panelbutton.cpp
Bugfree patch for kicker/libkicker/panelbutton.cpp |
Description
Maxilys
2006-06-04 16:11:59 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.
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.
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; } |