summaryrefslogtreecommitdiff
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2020-05-31 12:37:46 +0100
committerReto Brunner <reto@labrat.space>2020-06-09 08:48:47 +0200
commit543510f5c146aa6e4d3344ec7d109ad7945fa106 (patch)
tree7356a64e28c2ab9123e84a76381e2cd99e82849a /widgets/aerc.go
parent3877b1aa719569d3666bce227e351afcbc2628af (diff)
downloadaerc-543510f5c146aa6e4d3344ec7d109ad7945fa106.zip
Make grid sizes dynamic
The grid used static sizes which meant that changing settings didn't have an effect on elements of the ui, notably the sidebar width. This patch makes the `Size` parameter of a cell a function which returns the `int`, allowing for dynamic sizes. A `Const` function is also included for ease of use for static sizes.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 829873a..4913be3 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -56,11 +56,11 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger,
statusbar.Push(statusline)
grid := ui.NewGrid().Rows([]ui.GridSpec{
- {ui.SIZE_EXACT, 1},
- {ui.SIZE_WEIGHT, 1},
- {ui.SIZE_EXACT, 1},
+ {ui.SIZE_EXACT, ui.Const(1)},
+ {ui.SIZE_WEIGHT, ui.Const(1)},
+ {ui.SIZE_EXACT, ui.Const(1)},
}).Columns([]ui.GridSpec{
- {ui.SIZE_WEIGHT, 1},
+ {ui.SIZE_WEIGHT, ui.Const(1)},
})
grid.AddChild(tabs.TabStrip)
grid.AddChild(tabs.TabContent).At(1, 0)
@@ -552,7 +552,6 @@ func (aerc *Aerc) CloseDialog() {
return
}
-
func (aerc *Aerc) GetPassword(title string, prompt string) (chText chan string, chErr chan error) {
chText = make(chan string, 1)
chErr = make(chan error, 1)