diff options
Diffstat (limited to 'source/ui/Ui.mc')
| -rw-r--r-- | source/ui/Ui.mc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/ui/Ui.mc b/source/ui/Ui.mc index a8d1ec7..bf52520 100644 --- a/source/ui/Ui.mc +++ b/source/ui/Ui.mc @@ -15,6 +15,7 @@ module Ui { const ELLIPSIS = "…"; const WARN_COLOR = 0xFF5555; + const LIGHT_WARN_COLOR = 0xCC0000; // 0xFF5555 is too faint on white for small text const ACCENT_COLOR = 0x00AAAA; // the teal of the launcher icon const LIGHT_ACCENT_COLOR = 0x007777; @@ -71,6 +72,11 @@ module Ui { return dark() ? ACCENT_COLOR : LIGHT_ACCENT_COLOR; } + // Warnings (wrong PIN, the last seconds of a code) in the theme. + function warn() as Number { + return dark() ? WARN_COLOR : LIGHT_WARN_COLOR; + } + // Clear the screen in the theme's background. function clear(dc as Graphics.Dc) as Void { dc.setColor(fg(), bg()); @@ -142,7 +148,7 @@ module Ui { if (period <= 0 || remaining <= 0) { return; } - dc.setColor(remaining <= 5 ? WARN_COLOR : accent(), Graphics.COLOR_TRANSPARENT); + dc.setColor(remaining <= 5 ? warn() : accent(), Graphics.COLOR_TRANSPARENT); var pen = r / 2 > 1 ? r / 2 : 1; dc.setPenWidth(pen); var sweep = 360 * remaining / period; |
