mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#457 cleanup
This commit is contained in:
parent
55e4e5a68b
commit
b94c89f4ec
@ -45,7 +45,7 @@ local RIGHT = core.ALIGN.RIGHT
|
||||
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.3.3", { "Added blue indicators color mode" } }
|
||||
{ "v1.3.3", { "Added standard with black off state color mode", "Added blue indicator color modes" } }
|
||||
}
|
||||
|
||||
---@class crd_configurator
|
||||
|
@ -88,19 +88,19 @@ style.theme = smooth_stone
|
||||
---@param fp FP_THEME front panel theme
|
||||
---@param color_mode COLOR_MODE the color mode to use
|
||||
function style.set_themes(main, fp, color_mode)
|
||||
local colorblind = not (color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.STD_ON_BLACK)
|
||||
local black_ind_off = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.BLUE_IND
|
||||
local colorblind = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.STD_ON_BLACK
|
||||
local gray_ind_off = color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.BLUE_IND
|
||||
|
||||
style.ind_bkg = colors.gray
|
||||
style.fp_ind_bkg = util.trinary(black_ind_off, colors.black, colors.gray)
|
||||
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.gray)
|
||||
style.fp_ind_bkg = util.trinary(gray_ind_off, colors.gray, colors.black)
|
||||
style.ind_hi_box_bg = util.trinary(gray_ind_off, colors.gray, colors.black)
|
||||
|
||||
if main == themes.UI_THEME.SMOOTH_STONE then
|
||||
style.theme = smooth_stone
|
||||
style.ind_bkg = util.trinary(black_ind_off, colors.black, colors.gray)
|
||||
style.ind_bkg = util.trinary(gray_ind_off, colors.gray, colors.black)
|
||||
elseif main == themes.UI_THEME.DEEPSLATE then
|
||||
style.theme = deepslate
|
||||
style.ind_hi_box_bg = util.trinary(black_ind_off, colors.black, colors.lightGray)
|
||||
style.ind_hi_box_bg = util.trinary(gray_ind_off, colors.lightGray, colors.black)
|
||||
end
|
||||
|
||||
style.colorblind = colorblind
|
||||
|
@ -40,7 +40,7 @@ local changes = {
|
||||
{ "v1.6.2", { "AuthKey minimum length is now 8 (if set)" } },
|
||||
{ "v1.6.8", { "ConnTimeout can now have a fractional part" } },
|
||||
{ "v1.6.15", { "Added front panel UI theme", "Added color accessibility modes" } },
|
||||
{ "v1.7.3", { "Added blue indicators color mode" } }
|
||||
{ "v1.7.3", { "Added standard with black off state color mode", "Added blue indicator color modes" } }
|
||||
}
|
||||
|
||||
---@class plc_configurator
|
||||
|
@ -2,8 +2,6 @@
|
||||
-- Graphics Style Options
|
||||
--
|
||||
|
||||
local util = require("scada-common.util")
|
||||
|
||||
local core = require("graphics.core")
|
||||
local themes = require("graphics.themes")
|
||||
|
||||
@ -31,9 +29,13 @@ function style.set_theme(fp, color_mode)
|
||||
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.colorblind = not (color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.STD_ON_BLACK)
|
||||
style.colorblind = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.STD_ON_BLACK
|
||||
|
||||
style.ind_bkg = util.trinary(color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.BLUE_IND, colors.black, colors.gray)
|
||||
if color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.BLUE_IND then
|
||||
style.ind_bkg = colors.gray
|
||||
else
|
||||
style.ind_bkg = colors.black
|
||||
end
|
||||
end
|
||||
|
||||
return style
|
||||
|
@ -78,7 +78,7 @@ assert(#PORT_DSGN == rsio.NUM_PORTS)
|
||||
local changes = {
|
||||
{ "v1.7.9", { "ConnTimeout can now have a fractional part" } },
|
||||
{ "v1.7.15", { "Added front panel UI theme", "Added color accessibility modes" } },
|
||||
{ "v1.9.2", { "Added blue indicators color mode" } }
|
||||
{ "v1.9.2", { "Added standard with black off state color mode", "Added blue indicator color modes" } }
|
||||
}
|
||||
|
||||
---@class rtu_rs_definition
|
||||
|
@ -2,8 +2,6 @@
|
||||
-- Graphics Style Options
|
||||
--
|
||||
|
||||
local util = require("scada-common.util")
|
||||
|
||||
local core = require("graphics.core")
|
||||
local themes = require("graphics.themes")
|
||||
|
||||
@ -30,9 +28,13 @@ function style.set_theme(fp, color_mode)
|
||||
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.colorblind = not (color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.STD_ON_BLACK)
|
||||
style.colorblind = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.STD_ON_BLACK
|
||||
|
||||
style.ind_bkg = util.trinary(color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.BLUE_IND, colors.black, colors.gray)
|
||||
if color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.BLUE_IND then
|
||||
style.ind_bkg = colors.gray
|
||||
else
|
||||
style.ind_bkg = colors.black
|
||||
end
|
||||
end
|
||||
|
||||
return style
|
||||
|
@ -37,7 +37,7 @@ 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.3.2", { "Added blue indicators color mode" } }
|
||||
{ "v1.3.2", { "Added standard with black off state color mode", "Added blue indicator color modes" } }
|
||||
}
|
||||
|
||||
---@class svr_configurator
|
||||
|
@ -28,7 +28,7 @@ function style.set_theme(fp, color_mode)
|
||||
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.colorblind = not (color_mode == themes.COLOR_MODE.STANDARD or color_mode == themes.COLOR_MODE.STD_ON_BLACK)
|
||||
style.colorblind = color_mode ~= themes.COLOR_MODE.STANDARD and color_mode ~= themes.COLOR_MODE.STD_ON_BLACK
|
||||
end
|
||||
|
||||
return style
|
||||
|
Loading…
Reference in New Issue
Block a user