diff --git a/kstyle/breeze.h b/kstyle/breeze.h --- a/kstyle/breeze.h +++ b/kstyle/breeze.h @@ -234,7 +234,8 @@ ArrowUp, ArrowDown, ArrowLeft, - ArrowRight + ArrowRight, + ArrowDown_Small, }; //* button type diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -1301,14 +1301,18 @@ case ArrowDown: arrow = QVector{QPointF( -4, -2 ), QPointF( 0, 2 ), QPointF( 4, -2 )}; break; case ArrowLeft: arrow = QVector{QPointF( 2, -4 ), QPointF( -2, 0 ), QPointF( 2, 4 )}; break; case ArrowRight: arrow = QVector{QPointF( -2, -4 ), QPointF( 2, 0 ), QPointF( -2, 4 )}; break; + case ArrowDown_Small: arrow = QVector{QPointF( 1.5, 3.5 ), QPointF( 3.5, 5.5 ), QPointF( 5.5, 3.5 )}; break; default: break; } painter->save(); painter->setRenderHints( QPainter::Antialiasing ); painter->translate( QRectF( rect ).center() ); painter->setBrush( Qt::NoBrush ); - painter->setPen( QPen( color, 1.1 ) ); + QPen pen( color, 1.1 ); + pen.setCapStyle(Qt::SquareCap); + pen.setJoinStyle(Qt::MiterJoin); + painter->setPen( pen ); painter->drawPolyline( arrow ); painter->restore(); } diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -2742,15 +2742,9 @@ // get relevant state flags const State& state( option->state ); const bool autoRaise( state & State_AutoRaise ); - const bool hasPopupMenu( toolButtonOption->features & QStyleOptionToolButton::MenuButtonPopup ); - const bool hasInlineIndicator( - toolButtonOption->features&QStyleOptionToolButton::HasMenu - && toolButtonOption->features&QStyleOptionToolButton::PopupDelay - && !hasPopupMenu ); const int marginWidth( autoRaise ? Metrics::ToolButton_MarginWidth : Metrics::Button_MarginWidth + Metrics::Frame_FrameWidth ); - if( hasInlineIndicator ) size.rwidth() += Metrics::ToolButton_InlineIndicatorWidth; size = expandSize( size, marginWidth ); return size; @@ -6124,7 +6118,7 @@ copy.rect = menuRect; if( sunken && !flat ) copy.rect.translate( 1, 1 ); - drawPrimitive( PE_IndicatorArrowDown, ©, painter, widget ); + drawIndicatorArrowPrimitive( ArrowDown_Small, ©, painter, widget ); } @@ -6152,7 +6146,6 @@ const int marginWidth( flat ? Metrics::ToolButton_MarginWidth : Metrics::Button_MarginWidth + Metrics::Frame_FrameWidth ); contentsRect = insideMargin( contentsRect, marginWidth, 0 ); - contentsRect.setRight( contentsRect.right() - Metrics::ToolButton_InlineIndicatorWidth ); contentsRect = visualRect( option, contentsRect ); }