Skip to content
Permalink
Browse files

[ui] Move property override button css to default style sheet

  • Loading branch information
nirvn committed Feb 9, 2019
1 parent 6bbc92c commit 977d778dc4621386e60cafb3acdc7529b96bd621
Showing with 5 additions and 6 deletions.
  1. +5 −0 src/app/qgisappstylesheet.cpp
  2. +0 −6 src/gui/qgspropertyoverridebutton.cpp
@@ -166,6 +166,11 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
"}" )
.arg( palette.highlight().color().name(),
palette.highlightedText().color().name() );

ss += QStringLiteral( "QgsPropertyOverrideButton { background: none; border: 1px solid rgba(0, 0, 0, 0%); } QgsPropertyOverrideButton:focus { border: 1px solid palette(highlight); }" );
#ifdef Q_OS_MACX
ss += QStringLiteral( "QgsPropertyOverrideButton::menu-indicator { width: 5px; }" );
#endif
}

QgsDebugMsg( QStringLiteral( "Stylesheet built: %1" ).arg( ss ) );
@@ -43,12 +43,6 @@ 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 ) );
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 977d778

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