[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/plasma/sreich/qml2-system-monitors] plasma/generic/applets/system-monitor/plotter/pri
From: Shaun Reich <shaun.reich () kdemail ! net>
Date: 2012-02-16 18:12:24
Message-ID: 20120216181224.37A99A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit cc42163f15d86ebc732b315f2c682127f7621281 by Shaun Reich.
Committed on 16/02/2012 at 15:39.
Pushed by sreich into branch 'plasma/sreich/qml2-system-monitors'.
properly calculate y for rect bar graph drawing
M +2 -2 plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js
http://commits.kde.org/kde-workspace/cc42163f15d86ebc732b315f2c682127f7621281
diff --git a/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js \
b/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js index \
d6fbb38..0dec146 100644
--- a/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js
+++ b/plasma/generic/applets/system-monitor/plotter/private/plotterpainter.js
@@ -177,7 +177,7 @@ function advancePlotter()
debug("$$$$$$$ vertSspace: " + vertSpace);
debug("$$$$$$$ yPercent: " + yPercent);
debug("$$$$$$$ graphPadding: " + graphPadding);
- var yPos = (400 * (yPercent / 100) + graphPadding * 2);
+ var yPos = (height * (yPercent / 100) + graphPadding * 2);
debug("randomly generated y pos: " + yPos);
addSample(height - yPos);
@@ -283,7 +283,7 @@ function drawBarGraph()
x = points[i].x;
y = points[i].scaledY;
- context.rect(x, y, horizSpace, height - graphPadding);
+ context.rect(x, y, horizSpace, (height - graphPadding) - y);
}
// context.lineTo(points[points.length - 1].x, height - graphPadding);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic