Match a notched panel by Hyprland's mode at a fractional scale - #668
Merged
Merged
Conversation
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.
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.
Qt's
devicePixelRatiois 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.cutoutTopnow matches the connector plus the physical modeHyprland.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.jsandBar.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.