Skip to content
Permalink
Browse files

[ux] Hide frame when collapsible group box is collapsed

Prevents an ugly cropped frame from showing in collapsed group
boxes
  • Loading branch information
nyalldawson committed Sep 14, 2018
1 parent a60324b commit a78a7e79082e44bf353b001a383be9c48a12354d
@@ -118,6 +118,7 @@ Visual fixes for when group box is collapsed/expanded
void clearModifiers();



};


@@ -382,7 +382,8 @@ void QgsCollapsibleGroupBoxBasic::updateStyle()
ss += QLatin1String( " background-color: rgba(0,0,0,0)" );
}
ss += '}';
setStyleSheet( styleSheet() + ss );
mStyleSheet = styleSheet() + ss;
setStyleSheet( mStyleSheet );

// clear toolbutton default background and border and apply offset
QString ssd;
@@ -445,6 +446,7 @@ void QgsCollapsibleGroupBoxBasic::collapseExpandFixes()

if ( mCollapsed )
{
setStyleSheet( mStyleSheet + " QgsCollapsibleGroupBoxBasic { border: none; }" );
Q_FOREACH ( QObject *child, children() )
{
QWidget *w = qobject_cast<QWidget *>( child );
@@ -457,6 +459,7 @@ void QgsCollapsibleGroupBoxBasic::collapseExpandFixes()
}
else // on expand
{
setStyleSheet( mStyleSheet );
Q_FOREACH ( QObject *child, children() )
{
QWidget *w = qobject_cast<QWidget *>( child );
@@ -166,6 +166,8 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox

QIcon mCollapseIcon;
QIcon mExpandIcon;

QString mStyleSheet;
};

/**

0 comments on commit a78a7e7

Please sign in to comment.
You can’t perform that action at this time.