@@ -144,8 +144,7 void HorizontalAxis::updateGeometry() | |||
|
144 | 144 | const qreal delta = rightBound - leftBound; |
|
145 | 145 | // Hide label in case visible part of the category at the grid edge is too narrow |
|
146 | 146 | if (delta < boundingRect.width() |
|
147 | && (leftBound == gridRect.left() || rightBound == gridRect.right()) | |
|
148 | && !intervalAxis()) { | |
|
147 | && (leftBound == gridRect.left() || rightBound == gridRect.right())) { | |
|
149 | 148 | forceHide = true; |
|
150 | 149 | } else { |
|
151 | 150 | labelItem->setPos(leftBound + (delta / 2.0) - center.x(), labelItem->pos().y()); |
@@ -181,6 +180,10 void HorizontalAxis::updateGeometry() | |||
|
181 | 180 | else |
|
182 | 181 | rightBound = qMin(layout[i + 1], gridRect.right()); |
|
183 | 182 | } |
|
183 | if (leftBound < gridRect.left()) | |
|
184 | leftBound = gridRect.left(); | |
|
185 | if (rightBound > gridRect.right()) | |
|
186 | rightBound = gridRect.right(); | |
|
184 | 187 | shadeItem->setRect(leftBound, gridRect.top(), rightBound - leftBound, |
|
185 | 188 | gridRect.height()); |
|
186 | 189 | if (shadeItem->rect().width() <= 0.0) |
@@ -146,8 +146,7 void VerticalAxis::updateGeometry() | |||
|
146 | 146 | const qreal delta = lowerBound - upperBound; |
|
147 | 147 | // Hide label in case visible part of the category at the grid edge is too narrow |
|
148 | 148 | if (delta < boundingRect.height() |
|
149 | && (lowerBound == gridRect.bottom() || upperBound == gridRect.top()) | |
|
150 | && !intervalAxis()) { | |
|
149 | && (lowerBound == gridRect.bottom() || upperBound == gridRect.top())) { | |
|
151 | 150 | forceHide = true; |
|
152 | 151 | } else { |
|
153 | 152 | labelItem->setPos(labelItem->pos().x() , lowerBound - (delta / 2.0) - center.y()); |
@@ -185,6 +184,10 void VerticalAxis::updateGeometry() | |||
|
185 | 184 | upperBound = qMax(layout[i + 1], gridRect.top()); |
|
186 | 185 | |
|
187 | 186 | } |
|
187 | if (lowerBound > gridRect.bottom()) | |
|
188 | lowerBound = gridRect.bottom(); | |
|
189 | if (upperBound < gridRect.top()) | |
|
190 | upperBound = gridRect.top(); | |
|
188 | 191 | shadeItem->setRect(gridRect.left(), upperBound, gridRect.width(), |
|
189 | 192 | lowerBound - upperBound); |
|
190 | 193 | if (shadeItem->rect().height() <= 0.0) |
General Comments 0
You need to be logged in to leave comments.
Login now