DolphinQt/Mapping: red = error, don't flash
This commit is contained in:
parent
526698d2fc
commit
2195ef30f3
|
@ -125,16 +125,11 @@ void MappingButton::UpdateIndicator()
|
||||||
const auto state = m_reference->State();
|
const auto state = m_reference->State();
|
||||||
|
|
||||||
QFont f = m_parent->font();
|
QFont f = m_parent->font();
|
||||||
QPalette p = m_parent->palette();
|
|
||||||
|
|
||||||
if (state > ControllerEmu::Buttons::ACTIVATION_THRESHOLD)
|
if (state > ControllerEmu::Buttons::ACTIVATION_THRESHOLD)
|
||||||
{
|
|
||||||
f.setBold(true);
|
f.setBold(true);
|
||||||
p.setColor(QPalette::ButtonText, Qt::red);
|
|
||||||
}
|
|
||||||
|
|
||||||
setFont(f);
|
setFont(f);
|
||||||
setPalette(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MappingButton::ConfigChanged()
|
void MappingButton::ConfigChanged()
|
||||||
|
|
|
@ -832,12 +832,9 @@ void CalibrationWidget::Update(Common::DVec2 point)
|
||||||
}
|
}
|
||||||
else if (IsPointOutsideCalibration(point, m_input))
|
else if (IsPointOutsideCalibration(point, m_input))
|
||||||
{
|
{
|
||||||
// Flashing bold and red on miscalibration.
|
// Bold and red on miscalibration.
|
||||||
if (QDateTime::currentDateTime().toMSecsSinceEpoch() % 500 < 350)
|
f.setBold(true);
|
||||||
{
|
p.setColor(QPalette::ButtonText, Qt::red);
|
||||||
f.setBold(true);
|
|
||||||
p.setColor(QPalette::ButtonText, Qt::red);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setFont(f);
|
setFont(f);
|
||||||
|
|
Loading…
Reference in New Issue