mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:27:45 +00:00
LibGUI: Implement GToolbar separators.
This commit is contained in:
parent
054e4caf49
commit
949c98c5af
3 changed files with 39 additions and 1 deletions
|
@ -197,8 +197,18 @@ public:
|
|||
Point bottom_right() const { return { right(), bottom() }; }
|
||||
|
||||
void center_within(const Rect& other)
|
||||
{
|
||||
center_horizontally_within(other);
|
||||
center_vertically_within(other);
|
||||
}
|
||||
|
||||
void center_horizontally_within(const Rect& other)
|
||||
{
|
||||
set_x(other.center().x() - width() / 2);
|
||||
}
|
||||
|
||||
void center_vertically_within(const Rect& other)
|
||||
{
|
||||
set_y(other.center().y() - height() / 2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue