#457 work on blue indicator modes

This commit is contained in:
Mikayla Fischler
2024-03-24 12:56:51 -04:00
parent 44c6352a8c
commit bb2c07963b
17 changed files with 108 additions and 36 deletions

View File

@@ -36,7 +36,8 @@ local RIGHT = core.ALIGN.RIGHT
-- changes to the config data/format to let the user know
local changes = {
{ "v1.2.12", { "Added front panel UI theme", "Added color accessibility modes" } }
{ "v1.2.12", { "Added front panel UI theme", "Added color accessibility modes" } },
{ "v1.3.2", { "Added blue indicators color mode" } }
}
---@class svr_configurator
@@ -783,7 +784,7 @@ local function config_view(display)
_ = IndLight{parent=clr_c_2,x=20,y=10,label="Warning",colors=cpair(colors.black,colors.yellow)}
_ = IndLight{parent=clr_c_2,x=20,y=11,label="Bad",colors=cpair(colors.black,colors.red)}
TextBox{parent=clr_c_2,x=1,y=14,height=6,text="Note: exact color varies by theme.",fg_bg=g_lg_fg_bg}
TextBox{parent=clr_c_2,x=20,y=13,height=2,width=23,text="Note: exact color varies by theme.",fg_bg=g_lg_fg_bg}
PushButton{parent=clr_c_2,x=44,y=14,min_width=6,text="Done",callback=function()clr_pane.set_value(1)end,fg_bg=nav_fg_bg,active_fg_bg=btn_act_fg_bg}

View File

@@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor")
local svsessions = require("supervisor.session.svsessions")
local SUPERVISOR_VERSION = "v1.3.1"
local SUPERVISOR_VERSION = "v1.3.2"
local println = util.println
local println_ts = util.println_ts

View File

@@ -2,6 +2,8 @@ local comms = require("scada-common.comms")
local log = require("scada-common.log")
local util = require("scada-common.util")
local themes = require("graphics.themes")
local svsessions = require("supervisor.session.svsessions")
local supervisor = {}
@@ -87,7 +89,7 @@ function supervisor.load_config()
cfv.assert_type_int(config.FrontPanelTheme)
cfv.assert_range(config.FrontPanelTheme, 1, 2)
cfv.assert_type_int(config.ColorMode)
cfv.assert_range(config.ColorMode, 1, 4)
cfv.assert_range(config.ColorMode, 1, themes.COLOR_MODE.NUM_MODES)
return cfv.valid()
end