Skip to content

Commit bf5b3f0

Browse files
committedFeb 9, 2019
[ui] Move property override button css to default style sheet
1 parent bfbb75a commit bf5b3f0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎src/app/qgisappstylesheet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
163163
"}" )
164164
.arg( palette.highlight().color().name(),
165165
palette.highlightedText().color().name() );
166+
167+
ss += QStringLiteral( "QgsPropertyOverrideButton { background: none; border: 1px solid rgba(0, 0, 0, 0%); } QgsPropertyOverrideButton:focus { border: 1px solid palette(highlight); }" );
168+
#ifdef Q_OS_MACX
169+
ss += QStringLiteral( "QgsPropertyOverrideButton::menu-indicator { width: 5px; }" );
170+
#endif
166171
}
167172

168173
QgsDebugMsg( QStringLiteral( "Stylesheet built: %1" ).arg( ss ) );

‎src/gui/qgspropertyoverridebutton.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ QgsPropertyOverrideButton::QgsPropertyOverrideButton( QWidget *parent,
4646

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

5650
setIconSize( QSize( iconSize, iconSize ) );
5751
setPopupMode( QToolButton::InstantPopup );

0 commit comments

Comments
 (0)