summaryrefslogtreecommitdiff
path: root/size.go
diff options
context:
space:
mode:
Diffstat (limited to 'size.go')
-rw-r--r--size.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/size.go b/size.go
index 064d2ae..47af74d 100644
--- a/size.go
+++ b/size.go
@@ -76,7 +76,7 @@ func (tk *guiWidget) Size() (int, int) {
case widget.Label:
return len(tk.String()) + 2, 1
case widget.Textbox:
- return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
+ return len(tk.String()) + 10, 3 // TODO: compute this based on 'window dense'
case widget.Checkbox:
return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
}
@@ -341,9 +341,13 @@ func (tk *guiWidget) getFullSize() rectType {
// the full size is exactly what gocui uses
switch tk.node.WidgetType {
case widget.Label:
- return tk.buttonFullSize()
+ r := tk.buttonFullSize()
+ r.w1 += 5
+ return r
case widget.Button:
- return tk.buttonFullSize()
+ r := tk.buttonFullSize()
+ r.w1 += 5
+ return r
case widget.Checkbox:
return tk.buttonFullSize()
case widget.Dropdown: