Skip to content

Commit

Permalink
Merge pull request #6537 from slarosa/menu-indicator
Browse files Browse the repository at this point in the history
fix size for menu indicator in data defined button
  • Loading branch information
m-kuhn authored May 31, 2018
2 parents 1d62d10 + 6d36085 commit 9c7cf40
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 9c7cf40

Please sign in to comment.