DolphinQt/MappingIndicator: Use Settings::IsThemeDark instead of reimplementing it.

This commit is contained in:
Jordan Woyak 2024-10-11 18:50:32 -05:00
parent d6e10e586a
commit 863889a34e
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Settings.h"
namespace
{
@ -96,7 +97,7 @@ QColor MappingIndicator::GetCenterColor() const
QColor MappingIndicator::GetDeadZoneColor() const
{
QColor color = GetBBoxBrush().color().valueF() > 0.5 ? Qt::black : Qt::white;
QColor color = Settings::Instance().IsThemeDark() ? Qt::white : Qt::black;
color.setAlphaF(0.25);
return color;
}
@ -126,7 +127,7 @@ QColor MappingIndicator::GetAltTextColor() const
void MappingIndicator::AdjustGateColor(QColor* color)
{
if (GetBBoxBrush().color().valueF() < 0.5)
if (Settings::Instance().IsThemeDark())
color->setHsvF(color->hueF(), color->saturationF(), 1 - color->valueF());
}