Skip to content
Permalink
Browse files

Merge pull request #6537 from slarosa/menu-indicator

fix size for menu indicator in data defined button
  • Loading branch information
m-kuhn committed May 31, 2018
2 parents 1d62d10 + 6d36085 commit 9c7cf40c07053679c21d8abcd4b56bb2ef89b7e6
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/gui/qgspropertyoverridebutton.cpp
@@ -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 );

0 comments on commit 9c7cf40

Please sign in to comment.
You can’t perform that action at this time.