Skip to content
Permalink
Browse files

Also show focus rect for QgsCollapsibleGroupBoxes

  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent fb32178 commit 9dff7ab607ba0bb75aaed89b9ff97d30fcf137d3
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgscollapsiblegroupbox.cpp
@@ -79,6 +79,8 @@ void QgsCollapsibleGroupBoxBasic::init()
// TODO set size (as well as margins) depending on theme, in updateStyle()
mCollapseButton->setIconSize( QSize( 12, 12 ) );
mCollapseButton->setIcon( mCollapseIcon );
setFocusProxy( mCollapseButton );
setFocusPolicy( Qt::StrongFocus );

connect( mCollapseButton, SIGNAL( clicked() ), this, SLOT( toggleCollapsed() ) );
connect( this, SIGNAL( toggled( bool ) ), this, SLOT( checkToggled( bool ) ) );
@@ -397,7 +399,7 @@ void QgsCollapsibleGroupBoxBasic::updateStyle()
QString ssd;
ssd = QString( "QgsCollapsibleGroupBoxBasic > QToolButton#%1, QgsCollapsibleGroupBox > QToolButton#%1 {" ).arg( mCollapseButton->objectName() );
ssd += " background-color: rgba(255, 255, 255, 0); border: none;";
ssd += "}";
ssd += QString( "} QgsCollapsibleGroupBoxBasic > QToolButton#%1:focus, QgsCollapsibleGroupBox > QToolButton#%1:focus { border: 1px solid palette(highlight); }" ).arg( mCollapseButton->objectName() );
mCollapseButton->setStyleSheet( ssd );
if ( offsetLeft != 0 || offsetTopTri != 0 )
mCollapseButton->move( offsetLeft, offsetTopTri );

0 comments on commit 9dff7ab

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