Skip to content
Permalink
Browse files

fix size for menu indicator in data defined button

  • Loading branch information
slarosa committed Mar 5, 2018
1 parent a34b46b commit 6d360856941c1e7b3b5ed24cbe720e41e8865bff
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 6d36085

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