LibGUI: Implement set_max_size

I already support set_min_size so why not this :)
This commit is contained in:
2025-06-25 13:31:54 +03:00
parent 85f200bd86
commit bbb490b24f
7 changed files with 58 additions and 2 deletions

View File

@@ -55,6 +55,9 @@ public:
Rectangle get_min_size() const { return m_min_size; }
void set_min_size(Rectangle min_size) { m_min_size = min_size.get_bounding_box({ 0, 0, m_title_bar_height, 0 }); }
Rectangle get_max_size() const { return m_max_size; }
void set_max_size(Rectangle max_size) { m_max_size = max_size; }
BAN::ErrorOr<void> set_title(BAN::StringView title) { m_title.clear(); TRY(m_title.append(title)); TRY(prepare_title_bar()); return {}; }
const uint32_t* framebuffer() const { return m_fb_addr; }
@@ -88,6 +91,7 @@ private:
const int m_client_fd { -1 };
Rectangle m_client_area { 0, 0, 0, 0 };
Rectangle m_min_size { 0, 0, m_title_bar_height, 0 };
Rectangle m_max_size { 0, 0, 10'000, 10'000 };
long m_smo_key { 0 };
uint32_t* m_fb_addr { nullptr };
BAN::String m_title;