From 6880581062bc085e84393337e141475418d65506 Mon Sep 17 00:00:00 2001 From: Andrii Ryzhkov Date: Thu, 10 Sep 2026 11:10:04 +0200 Subject: [PATCH] script_manager: use SVG for the start/stop button icons The power and blank icons were 20x21 PNGs, so they were upscaled and soft on a HiDPI screen and stayed 20px whatever the interface font size. As SVG they are rendered at whatever size is asked for. Geometry is taken from dtgtk_cairo_paint_switch() so the button matches darktable's own switch icon, with a margin inside the viewBox so the symbol does not touch the button border. --- data/icons/blank.svg | 2 ++ data/icons/power.svg | 7 +++++++ tools/script_manager.lua | 10 +++++----- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 data/icons/blank.svg create mode 100644 data/icons/power.svg diff --git a/data/icons/blank.svg b/data/icons/blank.svg new file mode 100644 index 00000000..17a10f42 --- /dev/null +++ b/data/icons/blank.svg @@ -0,0 +1,2 @@ + + diff --git a/data/icons/power.svg b/data/icons/power.svg new file mode 100644 index 00000000..0b111b78 --- /dev/null +++ b/data/icons/power.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/script_manager.lua b/tools/script_manager.lua index 038a6792..2bf48fd9 100644 --- a/tools/script_manager.lua +++ b/tools/script_manager.lua @@ -117,12 +117,12 @@ local LUA_SCRIPT_REPO = "https://github.com/darktable-org/lua-scripts.gi local LUA_API_VER = "API-" .. dt.configuration.api_version_string --- local POWER_ICON = dt.configuration.config_dir .. "/lua/data/data/icons/power.png" -local USER_POWER_ICON = dt.configuration.config_dir .. "/lua/data/icons/path20.png" -local USER_BLANK_ICON = dt.configuration.config_dir .. "/lua/data/icons/blank20.png" +-- local POWER_ICON = dt.configuration.config_dir .. "/lua/data/data/icons/power.svg" +local USER_POWER_ICON = dt.configuration.config_dir .. "/lua/data/icons/power.svg" +local USER_BLANK_ICON = dt.configuration.config_dir .. "/lua/data/icons/blank.svg" -local SYSTEM_POWER_ICON = dt.configuration.data_dir .. "/lua-scripts/data/icons/path20.png" -local SYSTEM_BLANK_ICON = dt.configuration.data_dir .. "/lua-scripts/data/icons/blank20.png" +local SYSTEM_POWER_ICON = dt.configuration.data_dir .. "/lua-scripts/data/icons/power.svg" +local SYSTEM_BLANK_ICON = dt.configuration.data_dir .. "/lua-scripts/data/icons/blank.svg" local LUA_DIR = USER_LUA_DIR local POWER_ICON = USER_POWER_ICON