ensure button highlight visibility, fix issue #37, thanks to @LeXofLeviafan

This commit is contained in:
Mathias Panzenböck
2022-07-16 03:42:00 +02:00
parent 317328f1d5
commit 0844b4a0c2

View File

@ -18,6 +18,7 @@ FlashButton::FlashButton(const QString &text, const QString &name, QWidget* pare
flashing = false;
setAutoDefault( false );
setAutoFillBackground( true );
setFocusPolicy(Qt::NoFocus);
}
@ -27,11 +28,13 @@ void FlashButton::flash()
emit( flashed( !flashing ) );
if (flashing)
{
setFlat( false );
setPalette( normalPalette );
flashing = false;
}
else
{
setFlat( true );
setPalette( flashPalette );
flashing = true;
}