mirror of https://github.com/espruino/BangleApps
center widget vertically
parent
650add7c84
commit
06c11c0fa4
|
@ -8,9 +8,9 @@ WIDGETS["bata"]={area:"tr",sortorder:-10,width:27,draw:function() {
|
|||
var x = this.x, y = this.y + 5;
|
||||
g.reset();
|
||||
g.setColor(g.theme.fg);
|
||||
g.fillRect(x,y+2,x+s-4,y+2+t); // outer
|
||||
g.clearRect(x+2,y+2+2,x+s-4-2,y+2+t-2); // centre
|
||||
g.fillRect(x,y+2-2,x+s-4,y+2+t-2); // outer
|
||||
g.clearRect(x+2,y+2+2-2,x+s-4-2,y+2+t-2-2); // centre
|
||||
g.setColor(g.theme.fg);
|
||||
g.fillRect(x+s-3,y+2+(((t - 1)/2)-1),x+s-2,y+2+(((t - 1)/2)-1)+4); // contact
|
||||
g.fillRect(x+3, y+5, x +4 + E.getBattery()*(s-12)/100, y+t-1); // the level
|
||||
g.fillRect(x+s-3,y+2+(((t - 1)/2)-1)-2,x+s-2,y+2+(((t - 1)/2)-1)+4-2); // contact
|
||||
g.fillRect(x+3, y+5-2, x +4 + E.getBattery()*(s-12)/100, y+t-1-2); // the level
|
||||
}};
|
||||
|
|
Loading…
Reference in New Issue