su colored lines...

pull/1464/head
Danny 2022-02-02 01:05:49 +01:00
parent 243538ac4c
commit 7ef30431f1
1 changed files with 2 additions and 6 deletions

View File

@ -198,22 +198,18 @@ class TimeCalClock{
//draw grid & Headline
const dNames = this.ABR_DAY.map((a) => a.length<=2 ? a : a.substr(0, 2)); //force shrt 2
for(var dNo=0; dNo<dNames.length; dNo++){
g.setColor(g.theme.fg);
const dIdx=this.settings().wdStrt>=0 ? (dNo+this.settings().wdStrt)%7 : (dNo+d.getDay()+4)%7;
const dName=dNames[dIdx];
if(dNo>0)
g.drawLine(dNo*CELL_W, CAL_Y, dNo*CELL_W, CAL_Y+CAL_AREA_H-1);
if (dIdx==0) {
//sunday colorize txt
g.setColor(this.nrgb[this.settings().suClr]);
}
if (dIdx==0) g.setColor(this.nrgb[this.settings().suClr]); //sunday maybe colorize txt
g.drawString(dName, dNo*CELL_W+(CELL_W-g.stringWidth(dName))/2+2, CAL_Y+1); //center Names
g.setColor(g.theme.fg);
}
var nextY=CAL_Y+DAY_NAME_FONT_SIZE;
g.setColor(g.theme.fg);
for(i=0; i<3; i++){
const y=nextY+i*CELL_H;
g.drawLine(Bangle.appRect.x, y, Bangle.appRect.x2, y);