Skip to content
Permalink
Browse files
Merge pull request #7799 from Tilka/mapping
DolphinQt/Mapping: red = error, don't flash
  • Loading branch information
leoetlino committed May 26, 2019
2 parents f819ea6 + 2195ef3 commit f92c17e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
@@ -125,16 +125,11 @@ void MappingButton::UpdateIndicator()
const auto state = m_reference->State();

QFont f = m_parent->font();
QPalette p = m_parent->palette();

if (state > ControllerEmu::Buttons::ACTIVATION_THRESHOLD)
{
f.setBold(true);
p.setColor(QPalette::ButtonText, Qt::red);
}

setFont(f);
setPalette(p);
}

void MappingButton::ConfigChanged()
@@ -832,12 +832,9 @@ void CalibrationWidget::Update(Common::DVec2 point)
}
else if (IsPointOutsideCalibration(point, m_input))
{
// Flashing bold and red on miscalibration.
if (QDateTime::currentDateTime().toMSecsSinceEpoch() % 500 < 350)
{
f.setBold(true);
p.setColor(QPalette::ButtonText, Qt::red);
}
// Bold and red on miscalibration.
f.setBold(true);
p.setColor(QPalette::ButtonText, Qt::red);
}

setFont(f);

0 comments on commit f92c17e

Please sign in to comment.