fix: correct settings toggle knob alignment for all font sizes#373
Merged
shobhit99 merged 1 commit intoMay 11, 2026
Merged
Conversation
Contributor
|
Hey @monotykamary which version of supercmd are you on right now? i can't find the first toggle button for me on my version |
Collaborator
Author
Collaborator
Author
|
Oh I realized the calc is pretty consistent across the font-sizes already. Should be golden @shobhit99. Let me update the description a bit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Settings toggle sliders (AITab, ExtensionsTab) had a broken "on" position where the knob overshot the pill slightly (in the
smallfont size), making it look inconsistent with the "off" position.Root cause
The "off" position used
left-0.5(0.125rem) but the "on" position used a hardcodedtranslate-x-[18px]. Since the app supports dynamic root font sizes (12–20px), this fixed pixel value did not scale with the pill width, causing misalignment at different font sizes.Fix
Replaced the asymmetric
left-0.5/translate-x-[18px]approach with a symmetricleft-0.5↔right-0.5toggle. This guarantees identical inner padding on both sides at any font size, keeping the knob perfectly flush inside the pill.Files changed
src/renderer/src/settings/AITab.tsx(2 toggle instances)src/renderer/src/settings/ExtensionsTab.tsx(emoji picker toggle)