Skip to content

Commit af204b2

Browse files
authored
Refactor clockInfoMenu highlight color logic
1 parent 119e141 commit af204b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/dailycolorclk/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,13 @@ let clockInfoDraw = (itm, info, options) => {
145145
let clockInfoItems = require("clock_info").load();
146146
let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, {
147147
app:"slopeclockpp",x:98, y:38, w:70, h:50,
148-
draw : clockInfoDraw, bg : g.theme.bg, fg : g.theme.fg, hl : bgColor
148+
draw : clockInfoDraw, bg : g.theme.bg, fg : g.theme.fg, hl :
149+
(g.theme.fg===g.toColor(bgColor))?"#f00":bgColor
149150
});
150151
let clockInfoMenu2 = require("clock_info").addInteractive(clockInfoItems, {
151152
app:"slopeclockpp",x:10, y:102, w:70, h:50,
152-
draw : clockInfoDraw, bg : bgColor, fg : g.theme.bg, hl : (g.theme.fg===g.toColor(bgColor))?"#f00":g.theme.fg
153+
draw : clockInfoDraw, bg : bgColor, fg : g.theme.bg, hl :
154+
(g.theme.fg===g.toColor(bgColor))?"#f00":g.theme.fg
153155
});
154156

155157
// Show launcher when middle button pressed

0 commit comments

Comments
 (0)