mirror of https://github.com/espruino/BangleApps
notify: permit 0x0 colour and fallback depending on theme
parent
855f196fd3
commit
f3f223eff5
|
@ -9,3 +9,4 @@
|
|||
0.10: Improvements to help notifications work with themes
|
||||
0.11: Fix regression that caused no notifications and corrupted background
|
||||
0.12: Add Bangle.js 2 support with Bangle.setLCDOverlay
|
||||
0.13: Add a default title background for the dark theme
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "notify",
|
||||
"name": "Notifications (default)",
|
||||
"shortName": "Notifications",
|
||||
"version": "0.12",
|
||||
"version": "0.13",
|
||||
"description": "Provides the default `notify` module used by applications to display notifications on the screen. This module is installed by default by client applications such as the Gadgetbridge app. Installing `Fullscreen Notifications` replaces this module with a version that displays the notifications using the full screen",
|
||||
"icon": "notify.png",
|
||||
"type": "notify",
|
||||
|
|
|
@ -103,7 +103,7 @@ exports.show = function(options) {
|
|||
b -= 2;h -= 2;
|
||||
// title bar
|
||||
if (options.title || options.src) {
|
||||
g.setColor(options.titleBgColor||0x39C7).fillRect(x,y, r,y+20);
|
||||
g.setColor("titleBgColor" in options ? options.titleBgColor : g.theme.dark ? 0x1 : 0x39C7).fillRect(x,y, r,y+20);
|
||||
const title = options.title||options.src;
|
||||
g.setColor(g.theme.fg).setFontAlign(-1, -1, 0).setFont("6x8", 2);
|
||||
g.drawString(title.trim().substring(0, 13), x+25,y+3);
|
||||
|
|
|
@ -100,7 +100,7 @@ exports.show = function(options) {
|
|||
gg.clearRect(x,y, r,b);
|
||||
// title bar
|
||||
if (options.title || options.src) {
|
||||
gg.setColor(options.titleBgColor||0x39C7).fillRect(x,y, r,y+20);
|
||||
gg.setColor("titleBgColor" in options ? options.titleBgColor : g.theme.dark ? 0x1 : 0x39C7).fillRect(x,y, r,y+20);
|
||||
const title = options.title||options.src;
|
||||
gg.setColor(g.theme.fg).setFontAlign(-1, -1, 0).setFont("6x8", 2);
|
||||
gg.drawString(title.trim().substring(0, 13), x+25,y+3);
|
||||
|
|
Loading…
Reference in New Issue