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:
Vendored
+3
@@ -22,6 +22,9 @@ lite-xl (2.1.8-3) stonking; urgency=medium
|
||||
- default config uses JetBrains Mono (new fonts-jetbrains-mono dependency)
|
||||
* desktop: launch with SDL software rendering and LITE_SCALE=1.5 so text is
|
||||
sharp on fractional-scaled Wayland panels and avoids panfrost artifacts.
|
||||
* vendored nerdicons ships with the tuned icon rendering (whole-pixel size,
|
||||
hinting off) instead of the pristine upstream copy.
|
||||
* default config keeps the status bar always visible.
|
||||
|
||||
-- Valentin Haudiquet <valentin.haudiquet@canonical.com> Wed, 16 Sep 2026 21:50:00 +0200
|
||||
|
||||
|
||||
Vendored
+10
@@ -68,3 +68,13 @@ function TreeView:draw_item_background(item, active, hovered, x, y, w, h)
|
||||
renderer.draw_rect(x, y, w, h, style.treeview_active_bg or style.line_highlight)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------ Status bar -------------------------------------
|
||||
-- Keep the status bar always visible: show it at startup and turn the
|
||||
-- status-bar:hide / status-bar:toggle commands into no-ops so it cannot
|
||||
-- be dismissed (from the command palette or by any plugin).
|
||||
|
||||
core.status_view:show()
|
||||
local StatusView = require "core.statusview"
|
||||
function StatusView:toggle() self:show() end
|
||||
function StatusView:hide() self:show() end
|
||||
|
||||
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
|
||||
|
||||
+11
-1
@@ -1,6 +1,6 @@
|
||||
--- a/data/core/init.lua
|
||||
+++ b/data/core/init.lua
|
||||
@@ -475,79 +475,79 @@
|
||||
@@ -475,79 +475,89 @@
|
||||
local init_file = io.open(init_filename, "w")
|
||||
if not init_file then error("cannot create file: \"" .. init_filename .. "\"") end
|
||||
init_file:write([[
|
||||
@@ -145,6 +145,16 @@
|
||||
+ renderer.draw_rect(x, y, w, h, style.treeview_active_bg or style.line_highlight)
|
||||
+ end
|
||||
+end
|
||||
+
|
||||
+------------------------------ Status bar -------------------------------------
|
||||
+-- Keep the status bar always visible: show it at startup and turn the
|
||||
+-- status-bar:hide / status-bar:toggle commands into no-ops so it cannot
|
||||
+-- be dismissed (from the command palette or by any plugin).
|
||||
+
|
||||
+core.status_view:show()
|
||||
+local StatusView = require "core.statusview"
|
||||
+function StatusView:toggle() self:show() end
|
||||
+function StatusView:hide() self:show() end
|
||||
|
||||
]])
|
||||
init_file:close()
|
||||
|
||||
Reference in New Issue
Block a user