Skip to content

feat: add volume scroll to controls button and players - #132

Open
flathead wants to merge 4 commits into
Axenide:devfrom
flathead:feature/volume-scroll
Open

feat: add volume scroll to controls button and players#132
flathead wants to merge 4 commits into
Axenide:devfrom
flathead:feature/volume-scroll

Conversation

@flathead

@flathead flathead commented Mar 25, 2026

Copy link
Copy Markdown

Adds mouse wheel volume control to audio-related components across the bar and dashboard.

Changes

modules/bar/ControlsButton.qml -- added onWheel to the existing MouseArea. Scrolling on the controls button adjusts system volume without opening the popup.

modules/widgets/defaultview/CompactPlayer.qml -- added a MouseArea overlay at the bottom of the StyledRect with acceptedButtons: Qt.NoButton so it only captures wheel events and passes all clicks through to player controls. Scroll is only active when a player is present.

modules/widgets/dashboard/widgets/FullPlayer.qml -- same approach: a MouseArea overlay with acceptedButtons: Qt.NoButton at z:0, allowing volume scroll anywhere on the full player surface without interfering with seek bar, play/pause, or other controls.

All three use Audio.incrementVolume() / Audio.decrementVolume() for consistent step behavior with the rest of the shell.

Demo

2026-04-01T21-24-26-706Z.mp4

Install as a mod

Requires the native manager from PR #230. Paste the package link into Settings → Mods → Package source:

https://github.com/flathead/ambxst-mods/tree/main/packages/volume-scroll

This package adds no user-visible strings, so it has no required mods. From the CLI:

ambxst mods install https://github.com/flathead/ambxst-mods/tree/main/packages/volume-scroll
ambxst mods enable community.volume-scroll
ambxst reload

The packaged version uses WheelHandler on both players. It does not depend on sibling stacking order and does not place a full-size MouseArea over player controls.

Merge into Ambxst core

For core review, take this PR's branch: the feature as ordinary Ambxst source on dev.

The package patch is a separate artifact. It targets a tree that already carries the mod manager from PR #230, because that is the only tree a mod can be installed on. To reproduce exactly what the manager composes:

git remote add flathead https://github.com/flathead/Ambxst.git
git fetch flathead feature/mod-manager
git switch -c mods/volume-scroll flathead/feature/mod-manager
git apply --3way ambxst-mods/packages/volume-scroll/patches/feature.patch
go test ./...
go vet ./...

The patch only touches ControlsButton.qml, CompactPlayer.qml, and FullPlayer.qml. The installed mod and the core implementation use the same handlers and Audio service calls.

Package parity

Every file the package in flathead/ambxst-mods touches is byte-identical to this branch, WheelHandler rewrite included. This feature adds no user-visible strings, so there is no translator difference either.

Add mouse wheel volume control to the controls button, compact player
(notch) and full player (dashboard). Scrolling up increases volume,
scrolling down decreases it using Audio.incrementVolume/decrementVolume.

Player overlays use acceptedButtons: Qt.NoButton so clicks pass through
to existing controls underneath.

Modified files:
- modules/bar/ControlsButton.qml
- modules/widgets/defaultview/CompactPlayer.qml
- modules/widgets/dashboard/widgets/FullPlayer.qml
Move CompactPlayer scroll MouseArea to root Item level before StyledRect
instead of inside BarPopup, matching the correct z-order for wheel event
capture. Clean up FullPlayer MouseArea.
@Axenide

Axenide commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Nice, please add some screenshots. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants