Fix vendored nerdicons rendering; keep status bar always visible
- the vendored nerdicons.lua was the pristine upstream copy, so installs relying on the packaged plugin lost the tuned icon rendering (fractional glyph size and default hinting made icons feel soft and uneven). Apply the same tuning as the user config: whole-pixel icon size, hinting off, scale-aware chevron offset. - default config (skel + first-run template) and this repo's users keep the status bar permanently visible: shown at startup, and the status-bar:hide/toggle commands are no-ops.
This commit is contained in:
1 parent
3bae6fd448
commit
b8feb4f4db
4 files changed
+27
-3
No files matched your search
Vendored
+3
-2
@@ -55,7 +55,8 @@ config.plugins.nerdicons = common.merge({
|
||||
}
|
||||
}, config.plugins.nerdicons)
|
||||
|
||||
local icon_font = renderer.font.load(nerdfonts_symbols.path, 18.5 * SCALE)
|
||||
local icon_font = renderer.font.load(nerdfonts_symbols.path, common.round(18.5 * SCALE),
|
||||
{antialiasing = "grayscale", hinting = "none"})
|
||||
local map = nerdfonts_symbols.utf8
|
||||
local chevron_width = icon_font:get_width(map["oct-chevron_down"])
|
||||
local previous_scale = SCALE
|
||||
@@ -186,7 +187,7 @@ function TreeView:draw_item_chevron(item, active, hovered, x, y, w, h)
|
||||
if item.type == "dir" then
|
||||
local chevron_icon = item.expanded and "oct-chevron_down" or "oct-chevron_right"
|
||||
local chevron_color = hovered and style.accent or style.text
|
||||
common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x+8, y, 0, h) -- added 8 to x to draw the chevron closer to the icon
|
||||
common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x + common.round(6 * SCALE), y, 0, h)
|
||||
end
|
||||
return chevron_width + style.padding.x
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user