From 8433b1b216d9f077d84db70f0466e471f8981e54 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 15 Nov 2020 18:07:06 -0800 Subject: [PATCH] Add Size() method to ui.Window that returns the window body size --- window.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/window.go b/window.go index 8ff4591..a9dbd7a 100644 --- a/window.go +++ b/window.go @@ -315,6 +315,12 @@ func (w *Window) SetMaximized(v bool) { } } +// Size returns the window's size (the size of its underlying body frame, +// including its title bar and content frames). +func (w *Window) Size() render.Rect { + return w.body.Size() +} + // Close the window, hiding it from display and calling its CloseWindow handler. func (w *Window) Close() { w.Hide()