diff --git a/data/plugins/toolbarview.lua b/data/plugins/toolbarview.lua index 9cfa15e8..caf86d71 100644 --- a/data/plugins/toolbarview.lua +++ b/data/plugins/toolbarview.lua @@ -48,7 +48,7 @@ end function ToolbarView:get_icon_width() local max_width = 0 - for i,v in ipairs(self.toolbar_commands) do max_width = math.max(max_width, self.toolbar_font:get_width(v.symbol)) end + for i,v in ipairs(self.toolbar_commands) do max_width = math.max(max_width, (v.font or self.toolbar_font):get_width(v.symbol)) end return max_width end @@ -83,7 +83,7 @@ function ToolbarView:draw() for item, x, y, w, h in self:each_item() do local color = item == self.hovered_item and command.is_valid(item.command) and style.text or style.dim - common.draw_text(self.toolbar_font, color, item.symbol, nil, x, y, 0, h) + common.draw_text(item.font or self.toolbar_font, color, item.symbol, nil, x, y, 0, h) end end