Use the display aspect ratio instead of 16:9 in layout previews#385
Open
wjtje wants to merge 8 commits intodomferr:v17.1from
Open
Use the display aspect ratio instead of 16:9 in layout previews#385wjtje wants to merge 8 commits intodomferr:v17.1from
wjtje wants to merge 8 commits intodomferr:v17.1from
Conversation
Owner
|
Hey, I love it! I'm a bit busy in this period, hope to review soon! |
Owner
|
Changed the base branch to v17.1 to aim to get this feature in the upcoming release! |
domferr
reviewed
Oct 4, 2025
| const SNAP_ASSIST_LAYOUT_HEIGHT = 68; | ||
| // The size of the smallest size of the monitor | ||
| // Will result into a size of 120x68 if the monitor is 16:9 | ||
| const SNAP_ASSIST_LAYOUT_SIZE = 68; |
domferr
reviewed
Oct 4, 2025
| 0, | ||
| this._snapAssistantThreshold - | ||
| this.height / 2 + | ||
| 46 * getMonitorScalingFactor(this._monitorIndex) + |
Author
There was a problem hiding this comment.
This was the height of the snap-assist dropdown, before any of my changes.
Maybe a better calculation would be one of these:
((SNAP_ASSIST_LAYOUT_SIZE + this._padding) / 2) * getMonitorScalingFactor(this._monitorIndex)-> 42this._snapAssistantThreshold - (this._padding / 2)-> 46
Or change it entirely to this._padding, which looks about the same as the current value.
Author
There was a problem hiding this comment.
private get _desiredY(): number {
return this._isEnlarged
? Math.max(0, this._padding)
: -this.height + this._padding;
}…r#373) * feat: use gnome accent color as default for window border color * preserve previous border color set and improve user settings * Disable the setting if accent colors are not supported * enable only on GNOME 47+ --------- Co-authored-by: Domenico Ferraro <ferraro.domenico125@gmail.com>
38c0e52 to
510ae86
Compare
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.
Instead of using the default aspect ratio of 16:9 it now uses the actual ratio of the display. This results in a better UX for people using portrait displays or ultra-wide displays.
The change is made in the snap assist and default menu.
This change is as requested by issue #357