Skip to content

Commit

Permalink
outer ring default position indicator for QuantumKnob
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jan 29, 2025
1 parent 0a21f1b commit 2b95b47
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion opengl/Quantum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,13 @@ void AbstractQuantumKnob<small>::onNanoDisplay()
strokeColor(ringColor);
stroke();

// outer ring default position indicator
beginPath();
roundedRect(knobCenterX - ringSize / 2, knobCenterY - knobSize / 2 - ringSize * 1.25, ringSize, ringSize, ringSize * 0.5);
closePath();
fillColor(Color(1.0f, 1.0f, 1.0f, 0.5f));
fill();

// simulate color bleeding
beginPath();
if (small)
Expand All @@ -798,7 +805,7 @@ void AbstractQuantumKnob<small>::onNanoDisplay()
translate(knobCenterX, knobCenterY);
rotate(degToRad(45.0f) + normalizedValue * degToRad(270.0f));
beginPath();
roundedRect(0.f - ringSize, knobSize / 2 - ringSize * 4, ringSize, ringSize * 4, ringSize * 0.5);
roundedRect(0.f - ringSize / 2, knobSize / 2 - ringSize * 4, ringSize, ringSize * 4, ringSize * 0.5);
closePath();
fillColor(Color(1.0f, 1.0f, 1.0f));
fill();
Expand Down

0 comments on commit 2b95b47

Please sign in to comment.