Skip to content

Commit 4e09d4d

Browse files
committed
Remove option to bold group box names, now always on
1 parent fca8c5e commit 4e09d4d

File tree

4 files changed

+285
-123
lines changed

4 files changed

+285
-123
lines changed

src/app/qgisappstylesheet.cpp

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ QMap<QString, QVariant> QgisAppStyleSheet::defaultOptions()
8989
bool gbxCustom = ( mMacStyle ? true : false );
9090
opts.insert( "groupBoxCustom", settings.value( "groupBoxCustom", QVariant( gbxCustom ) ) );
9191

92-
bool gbxBoldTitle = false;
93-
opts.insert( "groupBoxBoldTitle", settings.value( "groupBoxBoldTitle", QVariant( gbxBoldTitle ) ) );
94-
9592
opts.insert( "sidebarStyle", settings.value( "sidebarStyle", true ) );
9693

9794
settings.endGroup(); // "qgis/stylesheet"
@@ -118,45 +115,40 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant>& opts )
118115
// QGroupBox and QgsCollapsibleGroupBox, mostly for Ubuntu and Mac
119116
bool gbxCustom = opts.value( "groupBoxCustom" ).toBool();
120117
QgsDebugMsg( QString( "groupBoxCustom: %1" ).arg( gbxCustom ) );
121-
bool gbxBoldTitle = opts.value( "groupBoxBoldTitle" ).toBool();
122-
QgsDebugMsg( QString( "groupBoxBoldTitle: %1" ).arg( gbxBoldTitle ) );
118+
123119
bool sidebar = opts.value( "sidebarStyle" ).toBool();
124-
if ( gbxCustom || gbxBoldTitle )
120+
121+
ss += "QGroupBox{";
122+
// doesn't work for QGroupBox::title
123+
ss += QString( "color: rgb(%1,%1,%1);" ).arg( mMacStyle ? 25 : 60 );
124+
ss += "font-weight: bold;";
125+
126+
if ( gbxCustom )
125127
{
126-
ss += "QGroupBox{";
127-
if ( gbxBoldTitle )
128-
{
129-
// doesn't work for QGroupBox::title
130-
ss += QString( "color: rgb(%1,%1,%1);" ).arg( mMacStyle ? 25 : 60 );
131-
ss += "font-weight: bold;";
132-
}
133-
if ( gbxCustom )
134-
{
135-
ss += QString( "background-color: rgba(0,0,0,%1%);" )
136-
.arg( mWinOS && mStyle.startsWith( "windows" ) ? 0 : 3 );
137-
ss += "border: 1px solid rgba(0,0,0,20%);";
138-
ss += "border-radius: 5px;";
139-
ss += "margin-top: 2.5ex;";
140-
ss += QString( "margin-bottom: %1ex;" ).arg( mMacStyle ? 1.5 : 1 );
141-
}
128+
ss += QString( "background-color: rgba(0,0,0,%1%);" )
129+
.arg( mWinOS && mStyle.startsWith( "windows" ) ? 0 : 3 );
130+
ss += "border: 1px solid rgba(0,0,0,20%);";
131+
ss += "border-radius: 5px;";
132+
ss += "margin-top: 2.5ex;";
133+
ss += QString( "margin-bottom: %1ex;" ).arg( mMacStyle ? 1.5 : 1 );
134+
}
135+
ss += "} ";
136+
if ( gbxCustom )
137+
{
138+
ss += "QGroupBox:flat{";
139+
ss += "background-color: rgba(0,0,0,0);";
140+
ss += "border: rgba(0,0,0,0);";
142141
ss += "} ";
143-
if ( gbxCustom )
142+
143+
ss += "QGroupBox::title{";
144+
ss += "subcontrol-origin: margin;";
145+
ss += "subcontrol-position: top left;";
146+
ss += "margin-left: 6px;";
147+
if ( !( mWinOS && mStyle.startsWith( "windows" ) ) && !mOxyStyle )
144148
{
145-
ss += "QGroupBox:flat{";
146149
ss += "background-color: rgba(0,0,0,0);";
147-
ss += "border: rgba(0,0,0,0);";
148-
ss += "} ";
149-
150-
ss += "QGroupBox::title{";
151-
ss += "subcontrol-origin: margin;";
152-
ss += "subcontrol-position: top left;";
153-
ss += "margin-left: 6px;";
154-
if ( !( mWinOS && mStyle.startsWith( "windows" ) ) && !mOxyStyle )
155-
{
156-
ss += "background-color: rgba(0,0,0,0);";
157-
}
158-
ss += "} ";
159150
}
151+
ss += "} ";
160152
}
161153

162154
if ( sidebar )

src/app/qgsoptions.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
537537
// custom group boxes
538538
mCustomGroupBoxChkBx->setChecked( mStyleSheetOldOpts.value( "groupBoxCustom" ).toBool() );
539539
mCustomSideBarSide->setChecked( mStyleSheetOldOpts.value( "sidebarStyle" ).toBool() );
540-
mBoldGroupBoxTitleChkBx->setChecked( mStyleSheetOldOpts.value( "groupBoxBoldTitle" ).toBool() );
541540

542541
mMessageTimeoutSpnBx->setValue( settings.value( "/qgis/messageTimeout", 5 ).toInt() );
543542

@@ -1446,12 +1445,6 @@ void QgsOptions::on_mCustomSideBarSide_clicked( bool chkd )
14461445
mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts );
14471446
}
14481447

1449-
void QgsOptions::on_mBoldGroupBoxTitleChkBx_clicked( bool chkd )
1450-
{
1451-
mStyleSheetNewOpts.insert( "groupBoxBoldTitle", QVariant( chkd ) );
1452-
mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts );
1453-
}
1454-
14551448
void QgsOptions::on_leProjectGlobalCrs_crsChanged( QgsCoordinateReferenceSystem crs )
14561449
{
14571450
mDefaultCrs = crs;

src/app/qgsoptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
115115
*/
116116
void on_mCustomSideBarSide_clicked( bool chkd );
117117

118-
/** Slot to set whether to bold group box title. */
119-
void on_mBoldGroupBoxTitleChkBx_clicked( bool chkd );
120-
121118
void on_mProxyTypeComboBox_currentIndexChanged( int idx );
122119

123120
/**Add a new URL to exclude from Proxy*/

0 commit comments

Comments
 (0)