Add GetHeight for Window

This commit is contained in:
scorpion-26 2023-07-19 01:05:33 +02:00
parent b95cf0d886
commit 9ee1fde653
2 changed files with 8 additions and 1 deletions

View file

@ -145,3 +145,10 @@ int Window::GetWidth() const
gdk_monitor_get_geometry(m_Monitor, &rect);
return rect.width;
}
int Window::GetHeight() const
{
GdkRectangle rect{};
gdk_monitor_get_geometry(m_Monitor, &rect);
return rect.height;
}

View file

@ -33,7 +33,7 @@ public:
void SetMainWidget(std::unique_ptr<Widget>&& mainWidget);
int GetWidth() const;
int GetHeight() const;
private:
void UpdateMargin();