resized the command palette so that the height is relative to the font size

This commit is contained in:
Felix Angell 2019-03-16 19:19:50 +00:00
parent 55bd38f041
commit d36ac61a74

View File

@ -124,7 +124,10 @@ func NewCommandPalette(conf cfg.TomlConfig, view *BufferView) *CommandPalette {
vW, _ := view.GetSize()
palette.Resize(vW/3, 48)
// set the palette to be 1/3rd of the size of the view
palette.Resize(vW/3, int(float64(newSize)*1.5))
// translate it to the centre of the view.
pW, pH := palette.GetSize()
palette.Translate((vW/2)-(pW/2), 10)