Skip to content

Commit 6c8eb18

Browse files
committed
fixed clock positions
1 parent 460f9bc commit 6c8eb18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ window.onload = function () {
411411
switch (options.ui_clock_clock) {
412412
case "1": {
413413
if (options.ui_clock_scale > 0) {
414-
let center = [Math.floor((columns - 17 * options.ui_clock_scale) / 2), Math.floor((rows + 5 * options.ui_clock_scale) / 2)];
414+
let center = [Math.floor((columns - 17 * options.ui_clock_scale) / 2), Math.floor((rows - 5 * options.ui_clock_scale) / 2)];
415415
drawTextOnMask(hour + ":" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY, options.ui_clock_scale);
416416
} else {
417417
let center = [Math.floor((columns - 5) / 2), Math.floor(rows / 2)];
@@ -421,8 +421,8 @@ window.onload = function () {
421421
}
422422
case "2": {
423423
if (options.ui_clock_scale > 0) {
424-
let center = [Math.floor((columns - 7 * options.ui_clock_scale) / 2), Math.floor((rows + options.ui_clock_scale) / 2)];
425-
drawTextOnMask(hour + "\\n" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY - 1 * options.ui_clock_scale, options.ui_clock_scale);
424+
let center = [Math.floor((columns - 7 * options.ui_clock_scale) / 2), Math.floor((rows - 11 * options.ui_clock_scale) / 2)];
425+
drawTextOnMask(hour + "\\n" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY , options.ui_clock_scale);
426426
} else {
427427
let center = [Math.floor((columns - 2) / 2), Math.floor((rows - 2) / 2)];
428428
drawTextOnMatrix(hour + "\\n" + minute, center[0] + options.ui_clock_positionX, center[1] + options.ui_clock_positionY);

0 commit comments

Comments
 (0)