diff --git a/geometry.cpp b/geometry.cpp --- a/geometry.cpp +++ b/geometry.cpp @@ -2006,8 +2006,8 @@ if (resized) { if (oldClientSize != QSize(w,h)) discardWindowPixmap(); - emit geometryShapeChanged(this, geometryBeforeUpdateBlocking()); } + emit geometryShapeChanged(this, geometryBeforeUpdateBlocking()); addRepaintDuringGeometryUpdates(); updateGeometryBeforeUpdateBlocking(); diff --git a/scene_opengl.cpp b/scene_opengl.cpp --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -2248,13 +2248,20 @@ const QRectF outerRect(QPointF(-leftOffset(), -topOffset()), QPointF(topLevel()->width() + rightOffset(), topLevel()->height() + bottomOffset())); - const int width = qMax(topLeft.width(), bottomLeft.width()) + + int width = qMax(topLeft.width(), bottomLeft.width()) + qMax(top.width(), bottom.width()) + qMax(topRight.width(), bottomRight.width()); - const int height = qMax(topLeft.height(), topRight.height()) + + int height = qMax(topLeft.height(), topRight.height()) + qMax(left.height(), right.height()) + qMax(bottomLeft.height(), bottomRight.height()); + //top/bottom borders were disabled, use the sides width + if (width == 0) { + width = left.width() + right.width(); + } + if (height == 0) { + height = top.height() + bottom.height(); + } qreal tx1(0.0), tx2(0.0), ty1(0.0), ty2(0.0); tx2 = topLeft.width()/width; @@ -2355,14 +2362,22 @@ const QSize topLeft(shadowPixmap(ShadowElementTopLeft).size()); const QSize bottomRight(shadowPixmap(ShadowElementBottomRight).size()); - const int width = qMax(topLeft.width(), bottomLeft.width()) + + int width = qMax(topLeft.width(), bottomLeft.width()) + qMax(top.width(), bottom.width()) + qMax(topRight.width(), bottomRight.width()); - const int height = qMax(topRight.height(), topLeft.height()) + + int height = qMax(topRight.height(), topLeft.height()) + qMax(left.height(), right.height()) + qMax(bottomLeft.height(), bottomRight.height()); + //top/bottom borders were disabled, use the sides width + if (width == 0) { + width = left.width() + right.width(); + } + if (height == 0) { + height = top.height() + bottom.height(); + } + if (width == 0 || height == 0) { return false; }