Skip to content

Match a notched panel by Hyprland's mode at a fractional scale - #668

Merged
maralcbr merged 2 commits into
quattro-upstreamfrom
mac/notch-fractional-scale
Sep 28, 2026
Merged

maralcbr merged 2 commits into
quattro-upstreamfrom
mac/notch-fractional-scale

Conversation

@maralcbr

Copy link
Copy Markdown
Collaborator

Qt's devicePixelRatio is a whole number even at a fractional scale, so the bar rebuilt the wrong physical mode and a 16" MacBook Pro at 1.33 got no notch floor. cutoutTop now matches the connector plus the physical mode Hyprland.monitorFor(screen) reports, uses the logical size times the ratio only until Hyprland answers, and gives a quarter-turned or upside-down panel no top cutout. Same fix as upstream's bar (omacom#13362); quattro-upstream's bar still reads the cutouts from the runtime tree, and #660 left that alone, so the fix goes where the logic lives: BarModel.js and Bar.qml.

Testing (Arch container, non-root): bar-notch-test.sh (fractional scales, mode beating the ratio, the pending fallback, transforms 1-7, a split row rounding up), bar-test.sh, apple-platform-hooks-test.sh. Hardware check owed on a 16" or a Mac at 1.33.

Second review: no bugs in the math or the Hyprland semantics. Two inherited gaps, also upstream: a bar recreated before Hyprland reports a re-enabled panel keeps the fallback until the shell restarts, and a transform change without a config reload isn't seen. Upstream also holds a top bar unmapped until the mode arrives; this PR doesn't, so the bar can grow once at startup.

Qt's devicePixelRatio is a whole number even at a fractional scale, so the logical size times it rebuilt the wrong mode and a 16" MacBook Pro at 1.33 got no notch floor. The bar now matches the connector plus the physical mode Hyprland reports for its screen, uses the logical size times the ratio only until Hyprland answers, and gives a quarter-turned or upside-down panel no top cutout. Same fix as upstream's bar.
@maralcbr
maralcbr merged commit a513cd0 into quattro-upstream Sep 28, 2026
5 checks passed
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.

1 participant