From 7214283c7b91864d13523233ffb485e8fe52f00e Mon Sep 17 00:00:00 2001 From: Raymundo Cassani Date: Sat, 17 Oct 2020 17:14:43 -0400 Subject: [PATCH] Fix the position of the labels --- files/system-monitor-graph@rcassani/desklet.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/system-monitor-graph@rcassani/desklet.js b/files/system-monitor-graph@rcassani/desklet.js index fa3bebe..abc2c17 100644 --- a/files/system-monitor-graph@rcassani/desklet.js +++ b/files/system-monitor-graph@rcassani/desklet.js @@ -229,14 +229,15 @@ MyDesklet.prototype = { this.text1.set_text(text1); this.text1.style = "font-size: " + text1_size + "px;" + "color: " + this.text_color + ";"; - this.text2.set_position(5 * unit_size, unit_size); + this.text2.set_position(this.text1.get_width() + (2 * unit_size), unit_size); this.text2.set_text(text2); this.text2.style = "font-size: " + text2_size + "px;" + "color: " + this.text_color + ";"; - this.text3.set_position(9.5 * unit_size, unit_size * 1.4); this.text3.set_text(text3); this.text3.style = "font-size: " + text3_size + "px;" + "color: " + this.text_color + ";"; + this.text3.set_position((21 * unit_size) - this.text3.get_width(), unit_size * 1.3333); + // update canvas canvas.invalidate();