From 1cbb09c5646c16aefc49846e24bc7cfffdb558e2 Mon Sep 17 00:00:00 2001 From: Jefferson González Date: Fri, 5 Dec 2025 07:43:59 -0400 Subject: Add the option to change background mode of images (#371) The options are: * "grid" - displays gray squares * "solid" - displays a configurable color * "none" - no background is displayed New config flags: ```lua ---The type of background drawn behind the images. --- ---Defaults to "grid". ---@type "grid" | "solid" | "none" config.images_background_mode = "grid" ---The color used for the background of transparent images when the ---background mode is set to solid. --- ---Defaults to "#ffffff". ---@type renderer.color config.images_background_color = { common.color "#ffffff" } ``` --- data/plugins/settings.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'data/plugins/settings.lua') diff --git a/data/plugins/settings.lua b/data/plugins/settings.lua index f2c22302..c4412236 100644 --- a/data/plugins/settings.lua +++ b/data/plugins/settings.lua @@ -721,6 +721,30 @@ settings.add("Editor", } ) +settings.add("Image Viewer", + { + { + label = "Background Mode", + description = "The type of background to draw behind transparent images.", + path = "images_background_mode", + type = settings.type.SELECTION, + default = "grid", + values = { + {"Grid", "grid"}, + {"Solid", "solid"}, + {"None", "none"} + } + }, + { + label = "Background Color", + description = "The color used when background mode is set to solid.", + path = "images_background_color", + type = settings.type.COLOR, + default = table.pack(table.unpack(config.images_background_color)) + } + } +) + settings.add("Development", { { -- cgit v1.2.3