New helper Window::setWindowCentered()
This commit is contained in:
+6
@@ -156,6 +156,12 @@ class Window {
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setWindowCentered()
|
||||||
|
{
|
||||||
|
rect.x = (parent->width() - width()) / 2;
|
||||||
|
rect.y = (parent->height() - height()) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
void setHeight(coord_t value)
|
void setHeight(coord_t value)
|
||||||
{
|
{
|
||||||
rect.h = value;
|
rect.h = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user