summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
Diffstat (limited to 'button.go')
-rw-r--r--button.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/button.go b/button.go
index ffbdc6d..e303ef4 100644
--- a/button.go
+++ b/button.go
@@ -67,3 +67,11 @@ func (b *Button) setRect(x int, y int, width int, height int) error {
return b.sysData.setRect(x, y, width, height)
}
+
+func (b *Button) preferredSize() (width int, height int, err error) {
+ b.lock.Lock()
+ defer b.lock.Unlock()
+
+ width, height = b.sysData.preferredSize()
+ return
+}