Skip to content

Commit

Permalink
Show focus rect around focused QgsDataDefinedButtons
Browse files Browse the repository at this point in the history
Helps with user interaction via the keyboard.
  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent 0c7bc40 commit 129ab4a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/qgsdatadefinedbutton.cpp
Expand Up @@ -53,9 +53,11 @@ QgsDataDefinedButton::QgsDataDefinedButton( QWidget* parent,
mIconDataDefineExpressionError = QgsApplication::getThemeIcon( "/mIconDataDefineExpressionError.svg" );
}

setFocusPolicy( Qt::StrongFocus );

// set default tool button icon properties
setFixedSize( 28, 24 );
setStyleSheet( QString( "QToolButton{ background: none; border: none;}" ) );
setFixedSize( 30, 26 );
setStyleSheet( QString( "QToolButton{ background: none; border: 1px solid rgba(0, 0, 0, 0%);} QToolButton:focus { border: 1px solid palette(highlight); }" ) );
setIconSize( QSize( 24, 24 ) );
setPopupMode( QToolButton::InstantPopup );

Expand Down

0 comments on commit 129ab4a

Please sign in to comment.