Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)

master
Gordon Williams 2023-05-15 09:21:41 +01:00
parent c3ec56a3a8
commit de79b0a39e
6 changed files with 8 additions and 12 deletions

View File

@ -32,3 +32,4 @@ clkinfo.addInteractive that would cause ReferenceError.
0.30: Use widget_utils 0.30: Use widget_utils
0.31: Use clock_info module as an app 0.31: Use clock_info module as an app
0.32: Make the border of the clock_info box extend all the way to the right of the screen. 0.32: Make the border of the clock_info box extend all the way to the right of the screen.
0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)

View File

@ -140,11 +140,8 @@ let clockInfoMenu = clock_info.addInteractive(clockInfoItems, {
draw : (itm, info, options) => { draw : (itm, info, options) => {
var hideClkInfo = info.text == null; var hideClkInfo = info.text == null;
g.setColor(g.theme.fg); g.reset().setBgColor(g.theme.fg).clearRect(options.x, options.y, options.x+options.w, options.y+options.h);
g.fillRect(options.x, options.y, options.x+options.w, options.y+options.h); g.setFontAlign(0,0).setColor(g.theme.bg);
g.setFontAlign(0,0);
g.setColor(g.theme.bg);
if (options.focus){ if (options.focus){
var y = hideClkInfo ? options.y+20 : options.y+2; var y = hideClkInfo ? options.y+20 : options.y+2;

View File

@ -1,7 +1,7 @@
{ {
"id": "bwclk", "id": "bwclk",
"name": "BW Clock", "name": "BW Clock",
"version": "0.32", "version": "0.33",
"description": "A very minimalistic clock.", "description": "A very minimalistic clock.",
"readme": "README.md", "readme": "README.md",
"icon": "app.png", "icon": "app.png",

View File

@ -35,3 +35,4 @@ clkinfo.addInteractive that would cause ReferenceError.
Remove invertion of theme as this doesn'twork very well with fastloading. Remove invertion of theme as this doesn'twork very well with fastloading.
Do an quick inital fillRect on theclock info area. Do an quick inital fillRect on theclock info area.
0.33: Make the border of the clock_info box extend all the way to the right of the screen. 0.33: Make the border of the clock_info box extend all the way to the right of the screen.
0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)

View File

@ -100,11 +100,8 @@ let clockInfoMenu = clock_info.addInteractive(clockInfoItems, {
draw : (itm, info, options) => { draw : (itm, info, options) => {
let hideClkInfo = info.text == null; let hideClkInfo = info.text == null;
g.setColor(g.theme.fg); g.reset().setBgColor(g.theme.fg).clearRect(options.x, options.y, options.x+options.w, options.y+options.h);
g.fillRect(options.x, options.y, options.x+options.w, options.y+options.h); g.setFontAlign(0,0).setColor(g.theme.bg);
g.setFontAlign(0,0);
g.setColor(g.theme.bg);
if (options.focus){ if (options.focus){
let y = hideClkInfo ? options.y+20 : options.y+2; let y = hideClkInfo ? options.y+20 : options.y+2;

View File

@ -1,7 +1,7 @@
{ {
"id": "bwclklite", "id": "bwclklite",
"name": "BW Clock Lite", "name": "BW Clock Lite",
"version": "0.33", "version": "0.34",
"description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.", "description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.",
"readme": "README.md", "readme": "README.md",
"icon": "app.png", "icon": "app.png",