summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2018-12-21 16:11:00 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2018-12-27 18:31:46 -0600
commitda9bcf83efeb1ede43e1c2ac08e6869ce8a2c15a (patch)
tree9418d35e0e0233bf26f91871002888dd9570bf79 /Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
parentceb28a2302e23b2484bca63626605d3fd56a1f11 (diff)
InputCommon: Simplified StickGate interface and moved class into its own file. Changed default input radius to perform no resizing. Tweaked the indicator colors a bit to improve visibility. Cleaned up some math and code.
Diffstat (limited to 'Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
index 538e67bc5c..e6e8c72875 100644
--- a/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
+++ b/Source/Core/DolphinQt/Config/Mapping/MappingIndicator.cpp
@@ -159,7 +159,8 @@ void MappingIndicator::DrawStick()
{
// Make the c-stick yellow:
const bool is_c_stick = m_group->name == "C-Stick";
- const QColor gate_color = is_c_stick ? Qt::yellow : Qt::lightGray;
+ const QColor gate_brush_color = is_c_stick ? Qt::yellow : Qt::lightGray;
+ const QColor gate_pen_color = gate_brush_color.darker(125);
auto& stick = *static_cast<ControllerEmu::AnalogStick*>(m_group);
@@ -191,8 +192,8 @@ void MappingIndicator::DrawStick()
p.setRenderHint(QPainter::SmoothPixmapTransform, true);
// Input gate. (i.e. the octagon shape)
- p.setPen(Qt::darkGray);
- p.setBrush(gate_color);
+ p.setPen(gate_pen_color);
+ p.setBrush(gate_brush_color);
p.drawPolygon(GetPolygonFromRadiusGetter(
[&stick](double ang) { return stick.GetGateRadiusAtAngle(ang); }, scale));