1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +00:00

LibGUI+WindowServer: Add resize_aspect_ratio()

When a resize_aspect_ratio is specified, and window will only be resized
to a multiple of that ratio. When resize_aspect_ratio is set, windows
cannot be tiled.
This commit is contained in:
Peter Elliott 2020-08-21 14:19:10 -06:00 committed by Andreas Kling
parent c68537271c
commit 45ed58865e
8 changed files with 51 additions and 1 deletions

View file

@ -43,6 +43,7 @@ endpoint WindowServer = 2
float opacity,
Gfx::IntSize base_size,
Gfx::IntSize size_increment,
Optional<Gfx::IntSize> resize_aspect_ratio,
i32 type,
[UTF8] String title,
i32 parent_window_id) => (i32 window_id)
@ -99,6 +100,7 @@ endpoint WindowServer = 2
GetSystemTheme() => ([UTF8] String theme_name)
SetWindowBaseSizeAndSizeIncrement(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) => ()
SetWindowResizeAspectRatio(i32 window_id, Optional<Gfx::IntSize> resize_aspect_ratio) => ()
EnableDisplayLink() =|
DisableDisplayLink() =|