diff --git a/src/app/qgisappstylesheet.cpp b/src/app/qgisappstylesheet.cpp index 2f493e16a24..81c47828421 100644 --- a/src/app/qgisappstylesheet.cpp +++ b/src/app/qgisappstylesheet.cpp @@ -89,9 +89,6 @@ QMap QgisAppStyleSheet::defaultOptions() bool gbxCustom = ( mMacStyle ? true : false ); opts.insert( "groupBoxCustom", settings.value( "groupBoxCustom", QVariant( gbxCustom ) ) ); - bool gbxBoldTitle = false; - opts.insert( "groupBoxBoldTitle", settings.value( "groupBoxBoldTitle", QVariant( gbxBoldTitle ) ) ); - opts.insert( "sidebarStyle", settings.value( "sidebarStyle", true ) ); settings.endGroup(); // "qgis/stylesheet" @@ -118,45 +115,40 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap& opts ) // QGroupBox and QgsCollapsibleGroupBox, mostly for Ubuntu and Mac bool gbxCustom = opts.value( "groupBoxCustom" ).toBool(); QgsDebugMsg( QString( "groupBoxCustom: %1" ).arg( gbxCustom ) ); - bool gbxBoldTitle = opts.value( "groupBoxBoldTitle" ).toBool(); - QgsDebugMsg( QString( "groupBoxBoldTitle: %1" ).arg( gbxBoldTitle ) ); + bool sidebar = opts.value( "sidebarStyle" ).toBool(); - if ( gbxCustom || gbxBoldTitle ) + + ss += "QGroupBox{"; + // doesn't work for QGroupBox::title + ss += QString( "color: rgb(%1,%1,%1);" ).arg( mMacStyle ? 25 : 60 ); + ss += "font-weight: bold;"; + + if ( gbxCustom ) { - ss += "QGroupBox{"; - if ( gbxBoldTitle ) + ss += QString( "background-color: rgba(0,0,0,%1%);" ) + .arg( mWinOS && mStyle.startsWith( "windows" ) ? 0 : 3 ); + ss += "border: 1px solid rgba(0,0,0,20%);"; + ss += "border-radius: 5px;"; + ss += "margin-top: 2.5ex;"; + ss += QString( "margin-bottom: %1ex;" ).arg( mMacStyle ? 1.5 : 1 ); + } + ss += "} "; + if ( gbxCustom ) + { + ss += "QGroupBox:flat{"; + ss += "background-color: rgba(0,0,0,0);"; + ss += "border: rgba(0,0,0,0);"; + ss += "} "; + + ss += "QGroupBox::title{"; + ss += "subcontrol-origin: margin;"; + ss += "subcontrol-position: top left;"; + ss += "margin-left: 6px;"; + if ( !( mWinOS && mStyle.startsWith( "windows" ) ) && !mOxyStyle ) { - // doesn't work for QGroupBox::title - ss += QString( "color: rgb(%1,%1,%1);" ).arg( mMacStyle ? 25 : 60 ); - ss += "font-weight: bold;"; - } - if ( gbxCustom ) - { - ss += QString( "background-color: rgba(0,0,0,%1%);" ) - .arg( mWinOS && mStyle.startsWith( "windows" ) ? 0 : 3 ); - ss += "border: 1px solid rgba(0,0,0,20%);"; - ss += "border-radius: 5px;"; - ss += "margin-top: 2.5ex;"; - ss += QString( "margin-bottom: %1ex;" ).arg( mMacStyle ? 1.5 : 1 ); + ss += "background-color: rgba(0,0,0,0);"; } ss += "} "; - if ( gbxCustom ) - { - ss += "QGroupBox:flat{"; - ss += "background-color: rgba(0,0,0,0);"; - ss += "border: rgba(0,0,0,0);"; - ss += "} "; - - ss += "QGroupBox::title{"; - ss += "subcontrol-origin: margin;"; - ss += "subcontrol-position: top left;"; - ss += "margin-left: 6px;"; - if ( !( mWinOS && mStyle.startsWith( "windows" ) ) && !mOxyStyle ) - { - ss += "background-color: rgba(0,0,0,0);"; - } - ss += "} "; - } } if ( sidebar ) diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index 0048f8b3a1b..ed53cb75f67 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -537,7 +537,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) : // custom group boxes mCustomGroupBoxChkBx->setChecked( mStyleSheetOldOpts.value( "groupBoxCustom" ).toBool() ); mCustomSideBarSide->setChecked( mStyleSheetOldOpts.value( "sidebarStyle" ).toBool() ); - mBoldGroupBoxTitleChkBx->setChecked( mStyleSheetOldOpts.value( "groupBoxBoldTitle" ).toBool() ); mMessageTimeoutSpnBx->setValue( settings.value( "/qgis/messageTimeout", 5 ).toInt() ); @@ -1446,12 +1445,6 @@ void QgsOptions::on_mCustomSideBarSide_clicked( bool chkd ) mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts ); } -void QgsOptions::on_mBoldGroupBoxTitleChkBx_clicked( bool chkd ) -{ - mStyleSheetNewOpts.insert( "groupBoxBoldTitle", QVariant( chkd ) ); - mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts ); -} - void QgsOptions::on_leProjectGlobalCrs_crsChanged( QgsCoordinateReferenceSystem crs ) { mDefaultCrs = crs; diff --git a/src/app/qgsoptions.h b/src/app/qgsoptions.h index 3aaf85ef2a2..51ed87a894a 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -115,9 +115,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption */ void on_mCustomSideBarSide_clicked( bool chkd ); - /** Slot to set whether to bold group box title. */ - void on_mBoldGroupBoxTitleChkBx_clicked( bool chkd ); - void on_mProxyTypeComboBox_currentIndexChanged( int idx ); /**Add a new URL to exclude from Proxy*/ diff --git a/src/ui/qgsoptionsbase.ui b/src/ui/qgsoptionsbase.ui index 3f60bcea0f2..0a836d35b90 100644 --- a/src/ui/qgsoptionsbase.ui +++ b/src/ui/qgsoptionsbase.ui @@ -45,7 +45,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -257,7 +266,16 @@ QFrame::Raised - + + 0 + + + 0 + + + 0 + + 0 @@ -267,7 +285,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -282,8 +309,8 @@ 0 - -137 - 626 + 0 + 635 670 @@ -586,32 +613,6 @@ - - - - - 0 - 0 - - - - Bold group box titles - - - - - - - - 12 - 0 - - - - Qt::Vertical - - - @@ -945,7 +946,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -960,8 +970,8 @@ 0 - -329 - 655 + 0 + 663 862 @@ -1320,7 +1330,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -1336,8 +1355,8 @@ 0 0 - 626 - 549 + 545 + 440 @@ -1630,7 +1649,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -1645,8 +1673,8 @@ 0 - -269 - 728 + 0 + 747 802 @@ -1865,7 +1893,16 @@ Rendering quality - + + 11 + + + 11 + + + 11 + + 11 @@ -1887,7 +1924,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -1971,7 +2017,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2003,7 +2058,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2035,7 +2099,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2074,7 +2147,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2106,7 +2188,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2163,7 +2254,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2269,7 +2369,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2285,8 +2394,8 @@ 0 0 - 626 - 549 + 171 + 258 @@ -2365,7 +2474,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2381,8 +2499,8 @@ 0 0 - 626 - 549 + 528 + 327 @@ -2694,7 +2812,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2708,9 +2835,9 @@ - -74 - -92 - 684 + 0 + 0 + 692 625 @@ -3187,7 +3314,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -3203,8 +3339,8 @@ 0 0 - 626 - 549 + 514 + 307 @@ -3383,7 +3519,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -3398,8 +3543,8 @@ 0 - -91 - 610 + 0 + 510 640 @@ -3874,7 +4019,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -3890,8 +4044,8 @@ 0 0 - 626 - 549 + 474 + 372 @@ -4004,7 +4158,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -4019,8 +4182,8 @@ 0 - -98 - 610 + 0 + 574 647 @@ -4241,7 +4404,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -4257,8 +4429,8 @@ 0 0 - 626 - 549 + 305 + 226 @@ -4331,7 +4503,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -4346,8 +4527,8 @@ 0 - -156 - 610 + 0 + 542 705 @@ -4788,7 +4969,6 @@ mMessageTimeoutSpnBx cbxHideSplash cbxShowTips - mBoldGroupBoxTitleChkBx mCustomGroupBoxChkBx mNativeColorDialogsChkBx mLiveColorDialogsChkBx