Skip to content
Permalink
Browse files

Show focus rect around focused QgsDataDefinedButtons

Helps with user interaction via the keyboard.
  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent 0c7bc40 commit 129ab4a18816ef1186eabd36c9068038b52a0408
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/qgsdatadefinedbutton.cpp
@@ -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 );

0 comments on commit 129ab4a

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