summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2019-12-05 13:58:19 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2019-12-05 14:09:06 +0000
commit8b1dcb1b3db09ba6e5ff26be3113d6e67c30da6e (patch)
treefd75f25f14332c03e24375e20770d7b38c0a664f /src
parent63c8a9ed533f25da030d38790cb4acc0df82ada4 (diff)
Place minor tickmarks on horizontal axis correctly
It looks like top and bottom was accidentally swapped when the dynamic tickmarks feature was added. This resulted in the minor tickmarks being drawn on the opposite edge of the canvas from the axis and the major tickmarks. Also modified the manual test to make drawing the grid optional, so the position of the tick marks can be seen more easily. Fixes: QTBUG-79349 Change-Id: Ia25c656d3d66ee0e6dd908504ec5c81cd2555bde Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/charts/axis/horizontalaxis.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/charts/axis/horizontalaxis.cpp b/src/charts/axis/horizontalaxis.cpp
index 821961c7..3bbc5ebe 100644
--- a/src/charts/axis/horizontalaxis.cpp
+++ b/src/charts/axis/horizontalaxis.cpp
@@ -485,12 +485,12 @@ void HorizontalAxis::updateMinorTickGeometry()
qreal minorArrowLineItemY2;
switch (axis()->alignment()) {
case Qt::AlignTop:
- minorArrowLineItemY1 = gridGeometry().bottom();
- minorArrowLineItemY2 = gridGeometry().bottom() - labelPadding() / 2.0;
+ minorArrowLineItemY1 = gridGeometry().top();
+ minorArrowLineItemY2 = gridGeometry().top() - labelPadding() / 2.0;
break;
case Qt::AlignBottom:
- minorArrowLineItemY1 = gridGeometry().top();
- minorArrowLineItemY2 = gridGeometry().top() + labelPadding() / 2.0;
+ minorArrowLineItemY1 = gridGeometry().bottom();
+ minorArrowLineItemY2 = gridGeometry().bottom() + labelPadding() / 2.0;
break;
default:
minorArrowLineItemY1 = 0.0;