-
-
Notifications
You must be signed in to change notification settings - Fork 66
Use the display aspect ratio instead of 16:9 in layout previews #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v17.1
Are you sure you want to change the base?
Conversation
|
Hey, I love it! I'm a bit busy in this period, hope to review soon! |
|
Changed the base branch to v17.1 to aim to get this feature in the upcoming release! |
| 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great idea!
| 0, | ||
| this._snapAssistantThreshold - | ||
| this.height / 2 + | ||
| 46 * getMonitorScalingFactor(this._monitorIndex) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 46?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
38c0e52 to
510ae86
Compare
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