@@ -117,6 +117,7 QSizeF ChartBarCategoryAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constra | |||||
117 | width = fn.boundingRect("...").width() + labelPadding(); |
|
117 | width = fn.boundingRect("...").width() + labelPadding(); | |
118 | height = fn.height(); |
|
118 | height = fn.height(); | |
119 | width+=base.width(); |
|
119 | width+=base.width(); | |
|
120 | if(base.width()>0) width+=labelPadding(); | |||
120 | height=qMax(height,base.height()); |
|
121 | height=qMax(height,base.height()); | |
121 | sh = QSizeF(width,height); |
|
122 | sh = QSizeF(width,height); | |
122 | break; |
|
123 | break; | |
@@ -126,10 +127,11 QSizeF ChartBarCategoryAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constra | |||||
126 | { |
|
127 | { | |
127 | QRectF rect = fn.boundingRect(ticksList.at(i)); |
|
128 | QRectF rect = fn.boundingRect(ticksList.at(i)); | |
128 | height+=rect.height(); |
|
129 | height+=rect.height(); | |
129 |
width=qMax(rect.width()+labelPadding() |
|
130 | width=qMax(rect.width()+labelPadding(),width); //one pixel torelance | |
130 | } |
|
131 | } | |
131 | height=qMax(height,base.height()); |
|
132 | height=qMax(height,base.height()); | |
132 | width+=base.width(); |
|
133 | width+=base.width(); | |
|
134 | if(base.width()>0) width+=labelPadding(); | |||
133 | sh = QSizeF(width,height); |
|
135 | sh = QSizeF(width,height); | |
134 | break; |
|
136 | break; | |
135 | } |
|
137 | } |
General Comments 0
You need to be logged in to leave comments.
Login now