Skip to content

Commit

Permalink
Reduce QuantumRadioSwitch size a bit
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jan 27, 2025
1 parent d880b39 commit 60c75f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions opengl/Quantum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ QuantumRadioSwitch::~QuantumRadioSwitch()

void QuantumRadioSwitch::adjustSize()
{
const uint width = theme.fontSize * 3.333 + theme.borderSize * 2;
const uint height = theme.fontSize * 1.666 + theme.borderSize * 2;
const uint width = theme.fontSize * 3 + theme.borderSize * 2;
const uint height = theme.fontSize * 1.333 + theme.borderSize * 2;

setSize(width, height);
}
Expand All @@ -452,15 +452,15 @@ void QuantumRadioSwitch::onNanoDisplay()

beginPath();
circle(checked ? theme.borderSize * 3 + radioSize : width - radioSize - theme.borderSize * 2,
radioSize + theme.borderSize * 3,
radioSize + theme.borderSize * 3.333,
radioSize);
fill();

fontSize(theme.fontSize);
textAlign(ALIGN_CENTER|ALIGN_MIDDLE);

if (checked)
text(getWidth() * 0.666 + theme.borderSize * 2, getHeight() / 2, "on", nullptr);
text(getWidth() * 0.666, getHeight() / 2, "on", nullptr);
else
text(getWidth() * 0.333 - theme.borderSize, getHeight() / 2, "off", nullptr);
}
Expand Down
4 changes: 2 additions & 2 deletions opengl/Quantum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ struct QuantumMetrics
theme.textHeight / 2 + theme.borderSize * 2),
normalSwitch(theme.fontSize * 2 + theme.borderSize * 2,
theme.fontSize + theme.borderSize * 2),
radioSwitch(theme.fontSize * 3.333 + theme.borderSize * 2,
theme.fontSize * 1.666 + theme.borderSize * 2),
radioSwitch(theme.fontSize * 3 + theme.borderSize * 2,
theme.fontSize * 1.333 + theme.borderSize * 2),
gainReductionMeter(theme.textHeight * 2,
theme.textHeight * 4),
knob(theme.textHeight * 3 / 2,
Expand Down

0 comments on commit 60c75f7

Please sign in to comment.