mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	[ux] Hide frame when collapsible group box is collapsed
Prevents an ugly cropped frame from showing in collapsed group boxes
This commit is contained in:
		
							parent
							
								
									a60324b79b
								
							
						
					
					
						commit
						a78a7e7908
					
				@ -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;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user