@@ -45,14 +45,13 QVariant PercentBarAnimation::interpolated(const QVariant &from, const QVariant | |||
|
45 | 45 | |
|
46 | 46 | Q_ASSERT(startVector.count() == endVector.count()); |
|
47 | 47 | |
|
48 |
qreal |
|
|
48 | qreal yAxis = m_item->geometry().height() + m_item->geometry().y(); | |
|
49 | 49 | |
|
50 | 50 | for(int i = 0; i < startVector.count(); i++) { |
|
51 | 51 | qreal w = endVector[i].width(); |
|
52 | 52 | qreal h = startVector[i].height() + ((endVector[i].height() - startVector[i].height()) * progress); |
|
53 | 53 | qreal x = endVector[i].topLeft().x(); |
|
54 |
qreal y = |
|
|
55 | + zeroPos; | |
|
54 | qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress); | |
|
56 | 55 | |
|
57 | 56 | QRectF value(x,y,w,h); |
|
58 | 57 | result << value; |
@@ -45,14 +45,13 QVariant StackedBarAnimation::interpolated(const QVariant &from, const QVariant | |||
|
45 | 45 | |
|
46 | 46 | Q_ASSERT(startVector.count() == endVector.count()); |
|
47 | 47 | |
|
48 |
qreal |
|
|
48 | qreal yAxis = m_item->geometry().height() + m_item->geometry().y(); | |
|
49 | 49 | |
|
50 | 50 | for(int i = 0; i < startVector.count(); i++) { |
|
51 | 51 | qreal w = endVector[i].width(); |
|
52 | 52 | qreal h = startVector[i].height() + ((endVector[i].height() - startVector[i].height()) * progress); |
|
53 | 53 | qreal x = endVector[i].topLeft().x(); |
|
54 |
qreal y = |
|
|
55 | + zeroPos; | |
|
54 | qreal y = yAxis + ((endVector[i].topLeft().y() - yAxis) * progress); | |
|
56 | 55 | |
|
57 | 56 | QRectF value(x,y,w,h); |
|
58 | 57 | result << value; |
General Comments 0
You need to be logged in to leave comments.
Login now