mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 11:12:49 +00:00
Add GetHeight for Window
This commit is contained in:
parent
4a9ac0ff5b
commit
b0c13801f6
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