Add a barHeight setting to cap bar travel - #1
Open
epicbagel wants to merge 1 commit into
Open
Conversation
The drawing track was pinned to the widget's full height minus 8px, with no way to tune it. Bars grow upward from the bottom of that track, so on a bar taller than the 26px default the visualiser's mass sits along the bottom edge while every neighbouring icon stays vertically centred. Measured on a 70px bar: the baseline landed at y=79 and the visible mass centred at y=66.5, against a bar centre of y=54 — 12.5px low. With barHeight at 20 the baseline moves to y=69 and the mass to y=56.5, 2.5px off centre. barHeight defaults to 0, which keeps the previous fill-the-bar behaviour, and is clamped to the space actually available so it can never overflow the bar. Exposed in the popup menu alongside bar width, and declared in the manifest schema and defaults. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRunvW8r5Qhi359HNzCdJa
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
trackis pinned to the widget's full height minus 8px, with no way to tune it:Bars grow upward from the bottom of that track. On a bar taller than the 26px
default, that sinks the visualizer's mass to the bottom edge while every
neighbouring icon stays vertically centred, so Cava reads as misaligned with the
rest of the bar.
I hit this on a 70px bar (a 5K display at scale 1.6, plus a floating bar inset).
Measurements
Measured from screenshots by scanning pixel columns, same audio source, bar slab
centre at y=54:
barHeight: 0(today)barHeight: 20Change
Adds a
barHeightsetting that caps how far a bar can travel:0, which keeps the current fill-the-bar behaviour exactly. Noexisting config changes appearance.
Math.min(barHeight, available), so it can never overflow the bar.0..128via the existingclampInthelper.defaultsandschemaso it shows up in plugin settings UI.Applies to vertical bars too, where it caps bar length rather than height.
Testing
omarchy plugin validatepasses.(
centre + track/2= 70, measured 69), and bar length stayed within the newbudget.
barHeight: 0renders identically to before the change.One note for anyone testing: the widget kept the old track after
omarchy-shell shell rescanPlugins; it only picked up the QML change afteromarchy restart shell.