Skip to content

Commit

Permalink
Merge pull request #3662 from devsnd/rest-0.02
Browse files Browse the repository at this point in the history
rest 0.02: use built-in rounded rect drawing, faster UI
  • Loading branch information
bobrippling authored Nov 18, 2024
2 parents 5211884 + 33e6023 commit e27cf05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions apps/rest/ChangeLog
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.01: First Release
0.02: Use built-in rounded-rect draw function, faster UI
2 changes: 1 addition & 1 deletion apps/rest/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ "id": "rest",
"name": "Rest - Workout Timer App",
"shortName":"Rest",
"version": "0.01",
"version": "0.02",
"description": "Rest timer and Set counter for workout, fitness and lifting things.",
"icon": "app.png",
"screenshots": [{"url": "screenshot1.png"}, {"url": "screenshot2.png"}, {"url": "screenshot3.png"}],
Expand Down
14 changes: 1 addition & 13 deletions apps/rest/rest.app.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@

function roundRect (x1, y1, x2, y2, halfrad) {
const fullrad = halfrad + halfrad
const bgColor = g.getBgColor();
const fgColor = g.getColor();
g.fillRect(x1, y1, x2, y2);
g.setColor(bgColor).fillRect(x1, y1, x1 + halfrad, y1 + halfrad);
g.setColor(fgColor).fillEllipse(x1, y1, x1 + fullrad, y1 + fullrad);
g.setColor(bgColor).fillRect(x2 - halfrad, y1, x2, y1 + halfrad);
g.setColor(fgColor).fillEllipse(x2 - fullrad, y1, x2, y1 + fullrad);

g.setColor(bgColor).fillRect(x1, y2-halfrad, x1 + halfrad, y2);
g.setColor(fgColor).fillEllipse(x1, y2-fullrad, x1 + fullrad, y2);
g.setColor(bgColor).fillRect(x2 - halfrad, y2-halfrad, x2, y2);
g.setColor(fgColor).fillEllipse(x2 - fullrad, y2-fullrad, x2, y2);
g.fillRect({x:x1, y:y1, x2:x2, y2:y2, r: halfrad});
}

function center(r) {
Expand Down

0 comments on commit e27cf05

Please sign in to comment.