[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 11/13: Make sure the CurveView text overlay actually overlays the lines
noreply at xfce.org
noreply at xfce.org
Wed Aug 12 18:39:15 CEST 2015
This is an automated email from the git hooks/post-receive script.
omegaphil pushed a commit to branch master
in repository panel-plugins/xfce4-hardware-monitor-plugin.
commit 4b7595f77fe59ef0b75416b15e2f5f68d875f840
Author: OmegaPhil <OmegaPhil at startmail.com>
Date: Sat Aug 8 19:56:14 2015 +0100
Make sure the CurveView text overlay actually overlays the lines
---
src/curve-view.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/curve-view.cpp b/src/curve-view.cpp
index 0f0ca5f..78b8595 100644
--- a/src/curve-view.cpp
+++ b/src/curve-view.cpp
@@ -82,15 +82,17 @@ void Curve::draw(Gnome::Canvas::Canvas &canvas, int width, int height,
ValueHistory::iterator vi = value_history.values.begin(),
vend = value_history.values.end();
- // only one point is pointless
+ // Only one point is pointless
if (std::distance(vi, vend) < 2)
return;
- // make sure line is initialised
+ /* Make sure line is initialised - lower to bottom in the canvas' 'z-order' so
+ * that the new text overlay is actually an overlay */
if (line.get() == 0) {
line.reset(new Gnome::Canvas::Line(*canvas.root()));
line->property_smooth() = true;
line->property_join_style() = Gdk::JOIN_ROUND;
+ line->lower_to_bottom();
}
// Get drawing attributes with defaults
@@ -111,7 +113,7 @@ void Curve::draw(Gnome::Canvas::Canvas &canvas, int width, int height,
Gnome::Canvas::Points points;
points.reserve(value_history.values.size());
- // start from right
+ // Start from right
double x = width + CurveView::pixels_per_sample * time_offset;
do {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list