#457 work on blue indicator modes
This commit is contained in:
@@ -44,7 +44,8 @@ local RIGHT = core.ALIGN.RIGHT
|
||||
-- changes to the config data/format to let the user know
|
||||
local changes = {
|
||||
{ "v1.2.4", { "Added temperature scale options" } },
|
||||
{ "v1.2.12", { "Added main UI theme", "Added front panel UI theme", "Added color accessibility modes" } }
|
||||
{ "v1.2.12", { "Added main UI theme", "Added front panel UI theme", "Added color accessibility modes" } },
|
||||
{ "v1.3.3", { "Added blue indicators color mode" } }
|
||||
}
|
||||
|
||||
---@class crd_configurator
|
||||
@@ -846,7 +847,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}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ local ppm = require("scada-common.ppm")
|
||||
local util = require("scada-common.util")
|
||||
local types = require("scada-common.types")
|
||||
|
||||
local themes = require("graphics.themes")
|
||||
|
||||
local iocontrol = require("coordinator.iocontrol")
|
||||
local process = require("coordinator.process")
|
||||
|
||||
@@ -100,7 +102,7 @@ function coordinator.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)
|
||||
|
||||
-- Monitor Setup
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ local sounder = require("coordinator.sounder")
|
||||
|
||||
local apisessions = require("coordinator.session.apisessions")
|
||||
|
||||
local COORDINATOR_VERSION = "v1.3.2"
|
||||
local COORDINATOR_VERSION = "v1.3.3"
|
||||
|
||||
local CHUNK_LOAD_DELAY_S = 30.0
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ local function init(panel, num_units)
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
|
||||
nt_lnk.register(ps, "link_state", function (state)
|
||||
local value = 2
|
||||
|
||||
@@ -89,16 +89,17 @@ style.theme = smooth_stone
|
||||
---@param color_mode COLOR_MODE the color mode to use
|
||||
function style.set_themes(main, fp, color_mode)
|
||||
local colorblind = color_mode ~= themes.COLOR_MODE.STANDARD
|
||||
local black_ind_off = colorblind and (color_mode ~= themes.COLOR_MODE.BLUE_IND)
|
||||
|
||||
style.ind_bkg = colors.gray
|
||||
style.ind_hi_box_bg = util.trinary(colorblind, colors.black, colors.gray)
|
||||
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.gray)
|
||||
|
||||
if main == themes.UI_THEME.SMOOTH_STONE then
|
||||
style.theme = smooth_stone
|
||||
style.ind_bkg = util.trinary(colorblind, colors.black, colors.gray)
|
||||
style.ind_bkg = util.trinary(black_ind_off, colors.black, colors.gray)
|
||||
elseif main == themes.UI_THEME.DEEPSLATE then
|
||||
style.theme = deepslate
|
||||
style.ind_hi_box_bg = util.trinary(colorblind, colors.black, colors.lightGray)
|
||||
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.lightGray)
|
||||
end
|
||||
|
||||
style.colorblind = colorblind
|
||||
|
||||
Reference in New Issue
Block a user