Commit 07367667 authored by Sebastian Gottfried's avatar Sebastian Gottfried
Browse files

graph plugin: fix shrinking behavior of line graph

The data points on the right side are considered more important than
the ones on the left side, so clipping starts on left side now. This
way the most recent data points stay visible when the window containing
the graph is resized to a smaller geometry.

BUG: 316163
FIXED-IN: 4.10.2
parent 76261039
......@@ -51,12 +51,22 @@ Item {
contentHeight: height
contentWidth: lineBg.width
property real lastWidth: -1
onContentWidthChanged: {
if (contentWidth > width) {
contentX = contentWidth - width
}
}
onWidthChanged: {
if (lastWidth != -1 && contentWidth > width) {
contentX = contentX + lastWidth - width
}
lastWidth = width
}
LineGraphBackgroundPainter {
id: lineBg
lineGraphCore: core
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment