mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
GWidget: Add set_size_policy(Orientation, Policy).
This allows you to set the policy for a single orientation rather than both at the same time.
This commit is contained in:
parent
10c35d345a
commit
7dc7f11ed8
2 changed files with 9 additions and 0 deletions
|
@ -44,6 +44,7 @@ public:
|
|||
SizePolicy vertical_size_policy() const { return m_vertical_size_policy; }
|
||||
SizePolicy size_policy(Orientation orientation) { return orientation == Orientation::Horizontal ? m_horizontal_size_policy : m_vertical_size_policy; }
|
||||
void set_size_policy(SizePolicy horizontal_policy, SizePolicy vertical_policy);
|
||||
void set_size_policy(Orientation, SizePolicy);
|
||||
|
||||
Size preferred_size() const { return m_preferred_size; }
|
||||
void set_preferred_size(const Size&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue