mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +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:
parent
c68537271c
commit
45ed58865e
8 changed files with 51 additions and 1 deletions
|
@ -207,6 +207,9 @@ public:
|
|||
Gfx::IntSize size_increment() const { return m_size_increment; }
|
||||
void set_size_increment(const Gfx::IntSize& increment) { m_size_increment = increment; }
|
||||
|
||||
const Optional<Gfx::IntSize>& resize_aspect_ratio() const { return m_resize_aspect_ratio; }
|
||||
void set_resize_aspect_ratio(const Optional<Gfx::IntSize>& ratio) { m_resize_aspect_ratio = ratio; }
|
||||
|
||||
Gfx::IntSize base_size() const { return m_base_size; }
|
||||
void set_base_size(const Gfx::IntSize& size) { m_base_size = size; }
|
||||
|
||||
|
@ -314,6 +317,7 @@ private:
|
|||
bool m_minimizable { false };
|
||||
bool m_frameless { false };
|
||||
bool m_resizable { false };
|
||||
Optional<Gfx::IntSize> m_resize_aspect_ratio {};
|
||||
bool m_listens_to_wm_events { false };
|
||||
bool m_minimized { false };
|
||||
bool m_maximized { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue