diff options
| author | Jeff Carr <[email protected]> | 2025-02-07 16:44:01 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-07 16:44:01 -0600 |
| commit | a295aa420b00e071510e7586d797cee6217f144e (patch) | |
| tree | 452cbaf266cdeb01929100af5d1c9caef35e57d7 /size.go | |
| parent | d8353f9b1a917cb12cdc19e68d73415f1679abd8 (diff) | |
remember stdout location on restore
Diffstat (limited to 'size.go')
| -rw-r--r-- | size.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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: |
