@@ -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 )
0 commit comments