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

LibGUI/Splitter: Support setting minimum resizee size

This commit is contained in:
Jelle Raaijmakers 2021-05-13 01:25:31 +02:00 committed by Linus Groh
parent fd896ad29d
commit e5647e2ddf
2 changed files with 14 additions and 5 deletions

View file

@ -16,6 +16,11 @@ class Splitter : public Widget {
public:
virtual ~Splitter() override;
int first_resizee_minimum_size() { return m_first_resizee_minimum_size; }
void set_first_resizee_minimum_size(int minimum_size) { m_first_resizee_minimum_size = minimum_size; }
int second_resizee_minimum_size() { return m_second_resizee_minimum_size; }
void set_second_resizee_minimum_size(int minimum_size) { m_second_resizee_minimum_size = minimum_size; }
protected:
explicit Splitter(Gfx::Orientation);
@ -41,6 +46,8 @@ private:
WeakPtr<Widget> m_second_resizee;
Gfx::IntSize m_first_resizee_start_size;
Gfx::IntSize m_second_resizee_start_size;
int m_first_resizee_minimum_size { 0 };
int m_second_resizee_minimum_size { 0 };
Gfx::IntRect m_grabbable_rect;
};