mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-24 20:22:10 +00:00
Add GetHeight for Window
This commit is contained in:
parent
b95cf0d886
commit
9ee1fde653
2 changed files with 8 additions and 1 deletions
|
@ -145,3 +145,10 @@ int Window::GetWidth() const
|
||||||
gdk_monitor_get_geometry(m_Monitor, &rect);
|
gdk_monitor_get_geometry(m_Monitor, &rect);
|
||||||
return rect.width;
|
return rect.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Window::GetHeight() const
|
||||||
|
{
|
||||||
|
GdkRectangle rect{};
|
||||||
|
gdk_monitor_get_geometry(m_Monitor, &rect);
|
||||||
|
return rect.height;
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
void SetMainWidget(std::unique_ptr<Widget>&& mainWidget);
|
void SetMainWidget(std::unique_ptr<Widget>&& mainWidget);
|
||||||
|
|
||||||
int GetWidth() const;
|
int GetWidth() const;
|
||||||
|
int GetHeight() const;
|
||||||
private:
|
private:
|
||||||
void UpdateMargin();
|
void UpdateMargin();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue