Skip to content

Commit

Permalink
fix size for menu indicator in data defined button
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Mar 5, 2018
1 parent a34b46b commit 6d36085
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgspropertyoverridebutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ QgsPropertyOverrideButton::QgsPropertyOverrideButton( QWidget *parent,

// button width is 1.25 * icon size, height 1.1 * icon size. But we round to ensure even pixel sizes for equal margins
setFixedSize( 2 * static_cast< int >( 1.25 * iconSize / 2.0 ), 2 * static_cast< int >( iconSize * 1.1 / 2.0 ) );
setStyleSheet( QStringLiteral( "QToolButton{ background: none; border: 1px solid rgba(0, 0, 0, 0%);} QToolButton:focus { border: 1px solid palette(highlight); }" ) );
QString ss;
ss += QStringLiteral( "QToolButton{ background: none; border: 1px solid rgba(0, 0, 0, 0%); } QToolButton:focus { border: 1px solid palette(highlight); }" );
#ifdef Q_OS_MACX
ss += QStringLiteral( "QToolButton::menu-indicator{ width: 5px; }" );
#endif
setStyleSheet( ss );

setIconSize( QSize( iconSize, iconSize ) );
setPopupMode( QToolButton::InstantPopup );
Expand Down

0 comments on commit 6d36085

Please sign in to comment.