mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 13:51:47 -05:00
ButtonSwitch: invoke setChecked on toggle handling so that the button face is changed appropriately
This commit is contained in:
parent
59a0cad7e9
commit
f455d0b984
@ -11,11 +11,18 @@ ButtonSwitch::ButtonSwitch(QWidget* parent) :
|
|||||||
|
|
||||||
void ButtonSwitch::onToggled(bool checked)
|
void ButtonSwitch::onToggled(bool checked)
|
||||||
{
|
{
|
||||||
if(checked) {
|
blockSignals(true);
|
||||||
|
setChecked(checked);
|
||||||
|
blockSignals(false);
|
||||||
|
|
||||||
|
if (checked)
|
||||||
|
{
|
||||||
QPalette p = m_originalPalette;
|
QPalette p = m_originalPalette;
|
||||||
p.setColor(QPalette::Button, QColor(0x80, 0x46, 0x00));
|
p.setColor(QPalette::Button, QColor(0x80, 0x46, 0x00));
|
||||||
setPalette(p);
|
setPalette(p);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
setPalette(m_originalPalette);
|
setPalette(m_originalPalette);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user