Repository navigation
feat: change the volume with a slider when hovering the Sound widget - #158
Merged
Merged
Conversation
Hovering the Sound widget opens a volume slider beside its icon, with the volume, and closes it when the pointer leaves. Dragging sets the volume through CoreAudio as it moves, keeps the balance and unmutes above zero. On the right of the bar the slider opens to the icon's left, so the icon stays under the pointer; elsewhere it opens to the right. The slider is a line of text tall, so the widget keeps its height, and the volume beside it is as wide as 100% so dragging doesn't move the bar. The open state is kept per display in the widget's presentation, which app menus that expand on hover now share, so the bar's measuring copy sizes the widget with it.
|
🎉 This PR is included in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Follows #157, which made the Sound widget show only its icon at rest.
Problem
Changing the volume from the bar means reaching for the keyboard or the menu-bar Sound menu. The Sound widget only shows the volume.
Changes
100%, so dragging doesn't resize the widget. The width change as it opens and closes animates, as in feat: show the volume only for a moment after it changes #157.expandedDisplaysand shared.layoutof its own, which is its default Display choice.audiosource.Surfaces: no configuration property, so the schema, decoders and Settings are unchanged.
Testing
swift test: 275 XCTest and 386 Swift Testing tests pass.onClick,openor a popup, which wrap it in a button.Recording:

Merging
One commit, so any merge method keeps it.
Claude Opus 5.5 via Claude Code