fix tooltip position

This commit is contained in:
sonichy
2025-05-04 23:04:55 +08:00
parent 915546ed12
commit 2516cc72b2
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ export default class CMUDExtension extends Extension {
if (x == 0 && y != 0) //LEFT if (x == 0 && y != 0) //LEFT
this.label_tooltip.set_position(x + this._indicator.width + 1, y); this.label_tooltip.set_position(x + this._indicator.width + 1, y);
else if (x != 0 && y == 0) //TOP else if (x != 0 && y == 0) //TOP
this.label_tooltip.set_position(x, y + this.label_tooltip.height + 4); this.label_tooltip.set_position(x, y + this._indicator.height + 1);
else else
if (this._indicator.height == Main.panel.height) //BOTTOM if (this._indicator.height == Main.panel.height) //BOTTOM
this.label_tooltip.set_position(x, y - this.label_tooltip.height - 1); this.label_tooltip.set_position(x, y - this.label_tooltip.height - 1);

View File

@@ -41,7 +41,7 @@ export default class DatetimeExtension extends Extension {
if (x == 0 && y != 0) //LEFT if (x == 0 && y != 0) //LEFT
this.label_tooltip.set_position(x + this._indicator.width + 1, y); this.label_tooltip.set_position(x + this._indicator.width + 1, y);
else if (x != 0 && y == 0) //TOP else if (x != 0 && y == 0) //TOP
this.label_tooltip.set_position(x, y + this.label_tooltip.height + 4); this.label_tooltip.set_position(x, y + this._indicator.height + 1);
else else
if (this._indicator.height == Main.panel.height) //BOTTOM if (this._indicator.height == Main.panel.height) //BOTTOM
this.label_tooltip.set_position(x, y - this.label_tooltip.height - 1); this.label_tooltip.set_position(x, y - this.label_tooltip.height - 1);