From 794191e563d53543cb513df0df7d5fcaba2ab5ac Mon Sep 17 00:00:00 2001 From: Raymundo Cassani Date: Mon, 24 Jun 2024 16:21:56 -0400 Subject: [PATCH] system-monitor-graph@rcassani: Reorder setting label's text, style and position (#1207) * Fixes #1100 --- files/system-monitor-graph@rcassani/desklet.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/system-monitor-graph@rcassani/desklet.js b/files/system-monitor-graph@rcassani/desklet.js index e0ecb31..cc5b99e 100755 --- a/files/system-monitor-graph@rcassani/desklet.js +++ b/files/system-monitor-graph@rcassani/desklet.js @@ -325,21 +325,21 @@ SystemMonitorGraph.prototype = { return false; }); - // text position and content + // labels: set text, style and position + this.text1.set_text(text1); + this.text1.style = "font-size: " + text1_size + "px;" + + "color: " + this.text_color + ";"; this.text1.set_position( Math.round(unit_size), Math.round((2.5 * unit_size) - this.text1.get_height()) ); - this.text1.set_text(text1); - this.text1.style = "font-size: " + text1_size + "px;" + this.text2.set_text(text2); + this.text2.style = "font-size: " + text2_size + "px;" + "color: " + this.text_color + ";"; this.text2.set_position( Math.round(this.text1.get_width() + (2 * unit_size)), Math.round((2.5 * unit_size) - this.text2.get_height()) ); - this.text2.set_text(text2); - this.text2.style = "font-size: " + text2_size + "px;" - + "color: " + this.text_color + ";"; this.text3.set_text(text3); this.text3.style = "font-size: " + text3_size + "px;" + "color: " + this.text_color + ";";