Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
breeze6
2000-toolbutton.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2000-toolbutton.patch of Package breeze6
diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 9e61960d22de1015392e4f8176c39ddc909ca993..a3b76cf87bdafeaada288409896605313bf223ba 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -186,7 +186,6 @@ bool isProgressBarHorizontal(const QStyleOptionProgressBar *option) enum class ToolButtonMenuArrowStyle { None, InlineLarge, - InlineSmall, SubControl, }; @@ -200,7 +199,6 @@ ToolButtonMenuArrowStyle toolButtonMenuArrowStyle(const QStyleOption *option) const bool hasPopupMenu(toolButtonOption->features & QStyleOptionToolButton::HasMenu && toolButtonOption->features & QStyleOptionToolButton::MenuButtonPopup); const bool hasInlineIndicator(toolButtonOption->features & QStyleOptionToolButton::HasMenu && !hasPopupMenu); - const bool hasDelayedMenu(hasInlineIndicator && toolButtonOption->features & QStyleOptionToolButton::PopupDelay); const bool hasIcon = !toolButtonOption->icon.isNull() || (toolButtonOption->features & QStyleOptionToolButton::Arrow); const bool iconOnly = toolButtonOption->toolButtonStyle == Qt::ToolButtonIconOnly || (toolButtonOption->text.isEmpty() && hasIcon); @@ -209,10 +207,6 @@ ToolButtonMenuArrowStyle toolButtonMenuArrowStyle(const QStyleOption *option) return ToolButtonMenuArrowStyle::SubControl; } - if (hasDelayedMenu) { - return ToolButtonMenuArrowStyle::InlineSmall; - } - if (hasInlineIndicator && !iconOnly) { return ToolButtonMenuArrowStyle::InlineLarge; } @@ -2828,13 +2822,7 @@ QRect Style::toolButtonSubControlRect(const QStyleOptionComplex *option, SubCont } auto menuRect(rect); - if (menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineSmall) { - QRect arrowRect(0, 0, Metrics::SmallArrowSize, Metrics::SmallArrowSize); - arrowRect.moveBottomRight(menuRect.bottomRight() - QPoint(4, 3)); - menuRect = arrowRect; - } else { - menuRect.setLeft(rect.right() - menuButtonWidth + 1); - } + menuRect.setLeft(rect.right() - menuButtonWidth + 1); return visualRect(option, menuRect); } @@ -7197,22 +7185,18 @@ bool Style::drawToolButtonComplexControl(const QStyleOptionComplex *option, QPai copy.state &= ~State_On; drawPrimitive(PE_IndicatorArrowDown, ©, painter, widget); - } else if (menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineSmall || menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineLarge) { + } else if (menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineLarge) { copy.rect = menuRect; copy.state &= ~State_MouseOver; copy.state &= ~State_Sunken; copy.state &= ~State_On; - if (menuStyle == BreezePrivate::ToolButtonMenuArrowStyle::InlineSmall) { - drawIndicatorArrowPrimitive(ArrowDown, ©, painter, widget); + if (option->direction == Qt::RightToLeft) { + copy.rect.translate(Metrics::Button_ItemSpacing, 0); } else { - if (option->direction == Qt::RightToLeft) { - copy.rect.translate(Metrics::Button_ItemSpacing, 0); - } else { - copy.rect.translate(-Metrics::Button_ItemSpacing, 0); - } - drawIndicatorArrowPrimitive(ArrowDown, ©, painter, widget); + copy.rect.translate(-Metrics::Button_ItemSpacing, 0); } + drawIndicatorArrowPrimitive(ArrowDown, ©, painter, widget); } // contents
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor