Skip to content

Commit 977d778

Browse files
committed
[ui] Move property override button css to default style sheet
1 parent 6bbc92c commit 977d778

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/app/qgisappstylesheet.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
166166
"}" )
167167
.arg( palette.highlight().color().name(),
168168
palette.highlightedText().color().name() );
169+
170+
ss += QStringLiteral( "QgsPropertyOverrideButton { background: none; border: 1px solid rgba(0, 0, 0, 0%); } QgsPropertyOverrideButton:focus { border: 1px solid palette(highlight); }" );
171+
#ifdef Q_OS_MACX
172+
ss += QStringLiteral( "QgsPropertyOverrideButton::menu-indicator { width: 5px; }" );
173+
#endif
169174
}
170175

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

src/gui/qgspropertyoverridebutton.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ QgsPropertyOverrideButton::QgsPropertyOverrideButton( QWidget *parent,
4343

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

5347
setIconSize( QSize( iconSize, iconSize ) );
5448
setPopupMode( QToolButton::InstantPopup );

0 commit comments

Comments
 (0)