Fixed bug. Now the color is changing for tabbing and backtabbing.
modified: mscore/accessibletoolbutton.cpp
This commit is contained in:
parent
95a08bbab0
commit
032ab3c0be
1 changed files with 3 additions and 3 deletions
|
@ -8,15 +8,15 @@ namespace Ms {
|
|||
AccessibleToolButton::AccessibleToolButton(QWidget* parent, QAction* defaultQAction ): QToolButton(parent){
|
||||
this->setDefaultAction(defaultQAction);
|
||||
this->setFocusPolicy(Qt::StrongFocus);
|
||||
this->setAutoRaise(true);
|
||||
|
||||
this->setAccessibleName(defaultQAction->text());
|
||||
this->setAccessibleDescription(defaultQAction->toolTip());
|
||||
}
|
||||
|
||||
|
||||
void AccessibleToolButton::focusInEvent(QFocusEvent* e){
|
||||
//If the button gains focus by tabbing, it will change its color
|
||||
if(e->reason() == Qt::TabFocusReason){
|
||||
//If the button gains focus by tabbing or backtabbing, it will change its color
|
||||
if(e->reason() == Qt::TabFocusReason || e->reason() == Qt::BacktabFocusReason){
|
||||
setGraphicsEffect(new QGraphicsColorizeEffect());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue