+
+ // Increase/decrease the current height of the widget to the
+ // required height. The increasing/decreasing is done in several
+ // steps to have an animation if the height is modified
+ // (see StatusBarMessageLabel::resizeEvent())
+ const int gap = m_minTextHeight / 2;
+ int minHeight = minimumHeight();
+ if (minHeight < requiredHeight) {
+ minHeight += gap;
+ if (minHeight > requiredHeight) {
+ minHeight = requiredHeight;
+ }
+ setMinimumHeight(minHeight);
+ updateGeometry();
+ }
+ else if (minHeight > requiredHeight) {
+ minHeight -= gap;
+ if (minHeight < requiredHeight) {
+ minHeight = requiredHeight;
+ }
+ setMinimumHeight(minHeight);
+ updateGeometry();
+ }
+
+ updateCloseButtonPosition();