Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
breeze
2000-toolbutton.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2000-toolbutton.patch of Package breeze
diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index ed6462c3b56e4056f9bba1cc8805975d9f08a7bf..003ab3a19610aba3ee7c7f8ff05f2b9c58394f3d 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -177,7 +177,6 @@ bool isProgressBarHorizontal(const QStyleOptionProgressBar *option) enum class ToolButtonMenuArrowStyle { None, InlineLarge, - InlineSmall, SubControl, }; @@ -190,7 +189,6 @@ ToolButtonMenuArrowStyle toolButtonMenuArrowStyle(const QStyleOption *option) const bool hasPopupMenu(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); @@ -199,10 +197,6 @@ ToolButtonMenuArrowStyle toolButtonMenuArrowStyle(const QStyleOption *option) return ToolButtonMenuArrowStyle::SubControl; } - if (hasDelayedMenu) { - return ToolButtonMenuArrowStyle::InlineSmall; - } - if (hasInlineIndicator && !iconOnly) { return ToolButtonMenuArrowStyle::InlineLarge; } @@ -2570,13 +2564,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); } @@ -6792,22 +6780,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