Ensure treeview is large enough to show toolbar

This commit is contained in:
Francesco Abbate
2021-02-27 19:39:56 +01:00
parent e861ea1d66
commit 4d320c1946
2 changed files with 11 additions and 2 deletions
+7
View File
@@ -64,6 +64,13 @@ function ToolbarView:each_item()
end
function ToolbarView:get_min_width()
local icon_w = style.icon_big_font:get_width("D")
local space = icon_w / 2
return 2 * style.padding.x + (icon_w + space) * #toolbar_commands - space
end
function ToolbarView:draw()
self:draw_background(style.background2)