diff options
Diffstat (limited to 'button.go')
| -rw-r--r-- | button.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 +} |
