Skip to content

Commit

Permalink
Also show focus rect for QgsCollapsibleGroupBoxes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent fb32178 commit 9dff7ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgscollapsiblegroupbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 9dff7ab

Please sign in to comment.