From de3377bca9d7608b96ed693f0473fedfe015ef25 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 21 May 2015 21:13:43 +1000 Subject: [PATCH] Remove option for custom side bar style, always on now --- src/app/qgisappstylesheet.cpp | 44 ++++++++++++----------------------- src/app/qgsoptions.cpp | 7 ------ src/app/qgsoptions.h | 5 ---- src/ui/qgsoptionsbase.ui | 10 +------- 4 files changed, 16 insertions(+), 50 deletions(-) diff --git a/src/app/qgisappstylesheet.cpp b/src/app/qgisappstylesheet.cpp index 81c47828421..63e59b128ce 100644 --- a/src/app/qgisappstylesheet.cpp +++ b/src/app/qgisappstylesheet.cpp @@ -89,8 +89,6 @@ QMap QgisAppStyleSheet::defaultOptions() bool gbxCustom = ( mMacStyle ? true : false ); opts.insert( "groupBoxCustom", settings.value( "groupBoxCustom", QVariant( gbxCustom ) ) ); - opts.insert( "sidebarStyle", settings.value( "sidebarStyle", true ) ); - settings.endGroup(); // "qgis/stylesheet" return opts; @@ -116,8 +114,6 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap& opts ) bool gbxCustom = opts.value( "groupBoxCustom" ).toBool(); QgsDebugMsg( QString( "groupBoxCustom: %1" ).arg( gbxCustom ) ); - bool sidebar = opts.value( "sidebarStyle" ).toBool(); - ss += "QGroupBox{"; // doesn't work for QGroupBox::title ss += QString( "color: rgb(%1,%1,%1);" ).arg( mMacStyle ? 25 : 60 ); @@ -151,31 +147,21 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap& opts ) ss += "} "; } - if ( sidebar ) - { - QString style = "QListWidget#mOptionsListWidget {" - " background-color: rgb(69, 69, 69, 220);" - " outline: 0;" - "}" - "QListWidget#mOptionsListWidget::item {" - " color: white;" - " padding: 3px;" - "}" - "QListWidget#mOptionsListWidget::item::selected {" - " color: black;" - " background-color:palette(Window);" - " padding-right: 0px;" - "}"; - ss += style; - } - - //fix background issue for gnome desktop - if ( mLinuxOS && mGtkStyle && !sidebar ) - { - ss += "QListWidget#mOptionsListWidget{"; - ss += "background-color: white;"; - ss += "} "; - } + //sidebar style + QString style = "QListWidget#mOptionsListWidget {" + " background-color: rgb(69, 69, 69, 220);" + " outline: 0;" + "}" + "QListWidget#mOptionsListWidget::item {" + " color: white;" + " padding: 3px;" + "}" + "QListWidget#mOptionsListWidget::item::selected {" + " color: black;" + " background-color:palette(Window);" + " padding-right: 0px;" + "}"; + ss += style; // Fix selection color on loosing focus (Windows) const QPalette palette = qApp->palette(); diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index 904486f4678..9029890edba 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -513,7 +513,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) : // custom group boxes mCustomGroupBoxChkBx->setChecked( mStyleSheetOldOpts.value( "groupBoxCustom" ).toBool() ); - mCustomSideBarSide->setChecked( mStyleSheetOldOpts.value( "sidebarStyle" ).toBool() ); mMessageTimeoutSpnBx->setValue( settings.value( "/qgis/messageTimeout", 5 ).toInt() ); @@ -1394,12 +1393,6 @@ void QgsOptions::on_mCustomGroupBoxChkBx_clicked( bool chkd ) mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts ); } -void QgsOptions::on_mCustomSideBarSide_clicked( bool chkd ) -{ - mStyleSheetNewOpts.insert( "sidebarStyle", 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 bfdcbfbda10..32b7002e59e 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -103,11 +103,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption /** Slot to set whether to use custom group boxes */ void on_mCustomGroupBoxChkBx_clicked( bool chkd ); - /** Slot to set whether to use custom side bar style - * @note added in QGIS 2.2 - */ - void on_mCustomSideBarSide_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 edd44c26c7f..9a8af134123 100644 --- a/src/ui/qgsoptionsbase.ui +++ b/src/ui/qgsoptionsbase.ui @@ -310,7 +310,7 @@ 0 0 - 635 + 610 635 @@ -600,13 +600,6 @@ - - - - Custom side bar style - - - @@ -4929,7 +4922,6 @@ mCustomGroupBoxChkBx mNativeColorDialogsChkBx mLiveColorDialogsChkBx - mCustomSideBarSide cbxCanvasRotation mProjectOnLaunchCmbBx mProjectOnLaunchLineEdit