mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
Ensure QgsPropertyOverrideButtons always look correct
We shouldn't require the main window stylesheet to be applied for these buttons to look right
This commit is contained in:
parent
1d206075c4
commit
eaf84540fd
@ -171,11 +171,6 @@ void QgisAppStyleSheet::applyStyleSheet( const QMap<QString, QVariant> &opts )
|
||||
"}" )
|
||||
.arg( palette.highlight().color().name(),
|
||||
palette.highlightedText().color().name() );
|
||||
|
||||
ss += QLatin1String( "QgsPropertyOverrideButton { background: none; border: 1px solid rgba(0, 0, 0, 0%); } QgsPropertyOverrideButton:focus { border: 1px solid palette(highlight); }" );
|
||||
#ifdef Q_OS_MACX
|
||||
ss += QLatin1String( "QgsPropertyOverrideButton::menu-indicator { width: 5px; }" );
|
||||
#endif
|
||||
}
|
||||
|
||||
QgsDebugMsgLevel( QStringLiteral( "Stylesheet built: %1" ).arg( ss ), 2 );
|
||||
|
@ -42,6 +42,12 @@ QgsPropertyOverrideButton::QgsPropertyOverrideButton( QWidget *parent,
|
||||
{
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
|
||||
QString 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 += QLatin1String( "QgsPropertyOverrideButton::menu-indicator { width: 5px; }" );
|
||||
#endif
|
||||
setStyleSheet( ss );
|
||||
|
||||
int iconSize = QgsGuiUtils::scaleIconSize( 24 );
|
||||
|
||||
// button width is 1.25 * icon size, height 1.1 * icon size. But we round to ensure even pixel sizes for equal margins
|
||||
|
Loading…
x
Reference in New Issue
Block a user