##// END OF EJS Templates
minAxisLayout increased by 1
Michal Klocek -
r2354:ca92a163f6a4
parent child
Show More
@@ -99,7 +99,9 QSizeF ChartValueAxisX::sizeHint(Qt::SizeHint which, const QSizeF &constraint) c
99 switch (which) {
99 switch (which) {
100 case Qt::MinimumSize: {
100 case Qt::MinimumSize: {
101 if(!ticksList.empty()) {
101 if(!ticksList.empty()) {
102 width = qMax(fn.boundingRect(ticksList.last()).width(),fn.boundingRect(ticksList.first()).width());
102 foreach(QString label,ticksList) {
103 width = qMax(qreal(fn.boundingRect(label).width()),width);
104 }
103 }
105 }
104 height = fn.height() + labelPadding();
106 height = fn.height() + labelPadding();
105 width = qMax(width,base.width());
107 width = qMax(width,base.width());
@@ -169,8 +169,8 QRectF ChartLayout::calculateAxisGeometry(const QRectF &geometry, const QList<Ch
169 if(rightCount>0)
169 if(rightCount>0)
170 right.setWidth(qMin(right.width(),hratio*rightCount));
170 right.setWidth(qMin(right.width(),hratio*rightCount));
171
171
172 qreal minHeight = qMax(minLeft.height(),minRight.height());
172 qreal minHeight = qMax(minLeft.height(),minRight.height()) + 1;
173 qreal minWidth = qMax(minTop.width(),minBottom.width());
173 qreal minWidth = qMax(minTop.width(),minBottom.width()) + 1;
174
174
175 QRectF chartRect = geometry.adjusted(qMax(left.width(),minWidth/2), qMax(top.height(), minHeight/2),-qMax(right.width(),minWidth/2),-qMax(bottom.height(),minHeight/2));
175 QRectF chartRect = geometry.adjusted(qMax(left.width(),minWidth/2), qMax(top.height(), minHeight/2),-qMax(right.width(),minWidth/2),-qMax(bottom.height(),minHeight/2));
176
176
General Comments 0
You need to be logged in to leave comments. Login now