Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/opengl/scene_opengl.cpp
Show First 20 Lines • Show All 2131 Lines • ▼ Show 20 Line(s) | 2131 | if (effects) { | |||
---|---|---|---|---|---|
2132 | effects->makeOpenGLContextCurrent(); | 2132 | effects->makeOpenGLContextCurrent(); | ||
2133 | DecorationShadowTextureCache::instance().unregister(this); | 2133 | DecorationShadowTextureCache::instance().unregister(this); | ||
2134 | m_texture.reset(); | 2134 | m_texture.reset(); | ||
2135 | } | 2135 | } | ||
2136 | } | 2136 | } | ||
2137 | 2137 | | |||
2138 | void SceneOpenGLShadow::buildQuads() | 2138 | void SceneOpenGLShadow::buildQuads() | ||
2139 | { | 2139 | { | ||
2140 | // prepare window quads | 2140 | // Do not draw shadows if window width or window height is less than | ||
2141 | // 5 px. 5 is an arbitrary choice. | ||||
2142 | if (topLevel()->width() < 5 || topLevel()->height() < 5) { | ||||
2141 | m_shadowQuads.clear(); | 2143 | m_shadowQuads.clear(); | ||
2144 | setShadowRegion(QRegion()); | ||||
2145 | return; | ||||
2146 | } | ||||
2147 | | ||||
2142 | const QSizeF top(elementSize(ShadowElementTop)); | 2148 | const QSizeF top(elementSize(ShadowElementTop)); | ||
2143 | const QSizeF topRight(elementSize(ShadowElementTopRight)); | 2149 | const QSizeF topRight(elementSize(ShadowElementTopRight)); | ||
2144 | const QSizeF right(elementSize(ShadowElementRight)); | 2150 | const QSizeF right(elementSize(ShadowElementRight)); | ||
2145 | const QSizeF bottomRight(elementSize(ShadowElementBottomRight)); | 2151 | const QSizeF bottomRight(elementSize(ShadowElementBottomRight)); | ||
2146 | const QSizeF bottom(elementSize(ShadowElementBottom)); | 2152 | const QSizeF bottom(elementSize(ShadowElementBottom)); | ||
2147 | const QSizeF bottomLeft(elementSize(ShadowElementBottomLeft)); | 2153 | const QSizeF bottomLeft(elementSize(ShadowElementBottomLeft)); | ||
2148 | const QSizeF left(elementSize(ShadowElementLeft)); | 2154 | const QSizeF left(elementSize(ShadowElementLeft)); | ||
2149 | const QSizeF topLeft(elementSize(ShadowElementTopLeft)); | 2155 | const QSizeF topLeft(elementSize(ShadowElementTopLeft)); | ||
2150 | if ((left.width() - leftOffset() > topLevel()->width()) || | | |||
2151 | (right.width() - rightOffset() > topLevel()->width()) || | | |||
2152 | (top.height() - topOffset() > topLevel()->height()) || | | |||
2153 | (bottom.height() - bottomOffset() > topLevel()->height())) { | | |||
2154 | // if our shadow is bigger than the window, we don't render the shadow | | |||
2155 | setShadowRegion(QRegion()); | | |||
2156 | return; | | |||
2157 | } | | |||
2158 | 2156 | | |||
2159 | const QRectF outerRect(QPointF(-leftOffset(), -topOffset()), | 2157 | const QRectF outerRect(QPointF(-leftOffset(), -topOffset()), | ||
2160 | QPointF(topLevel()->width() + rightOffset(), topLevel()->height() + bottomOffset())); | 2158 | QPointF(topLevel()->width() + rightOffset(), | ||
2159 | topLevel()->height() + bottomOffset())); | ||||
graesslin: To explain why this was added: in KPart based applications it could happen that a menu is empty. | |||||
Is there a test plan to see what it looks like without this if statement? zzag: Is there a test plan to see what it looks like without this if statement? | |||||
I hoped to find a bug report with the issue, but the commit which introduced that if statement doesn't have one linked: b837a3fca184fce0c7da317b2866d409892e71eb graesslin: I hoped to find a bug report with the issue, but the commit which introduced that if statement… | |||||
2161 | 2160 | | |||
2162 | const int width = std::max({topLeft.width(), left.width(), bottomLeft.width()}) + | 2161 | const int width = std::max({topLeft.width(), left.width(), bottomLeft.width()}) | ||
2163 | std::max(top.width(), bottom.width()) + | 2162 | + std::max(top.width(), bottom.width()) | ||
2164 | std::max({topRight.width(), right.width(), bottomRight.width()}); | 2163 | + std::max({topRight.width(), right.width(), bottomRight.width()}); | ||
2165 | const int height = std::max({topLeft.height(), top.height(), topRight.height()}) + | 2164 | const int height = std::max({topLeft.height(), top.height(), topRight.height()}) | ||
2166 | std::max(left.height(), right.height()) + | 2165 | + std::max(left.height(), right.height()) | ||
2167 | std::max({bottomLeft.height(), bottom.height(), bottomRight.height()}); | 2166 | + std::max({bottomLeft.height(), bottom.height(), bottomRight.height()}); | ||
2167 | | ||||
2168 | QRectF topLeftRect(outerRect.topLeft(), topLeft); | ||||
2169 | QRectF topRightRect(outerRect.topRight() - QPointF(topRight.width(), 0), topRight); | ||||
2170 | QRectF bottomRightRect( | ||||
2171 | outerRect.bottomRight() - QPointF(bottomRight.width(), bottomRight.height()), | ||||
2172 | bottomRight); | ||||
2173 | QRectF bottomLeftRect(outerRect.bottomLeft() - QPointF(0, bottomLeft.height()), bottomLeft); | ||||
2174 | | ||||
2175 | // Re-distribute the corner tiles so no one of them is overlapping with others. | ||||
2176 | // By doing this, we assume that shadow's corner tiles are symmetric | ||||
2177 | // and it is OK to not draw top/right/bottom/left tile between corners. | ||||
2178 | // For example, let's say top-left and top-right tiles are overlapping. | ||||
2179 | // In that case, the right side of the top-left tile will be shifted to left, | ||||
2180 | // the left side of the top-right tile will shifted to right, and the top | ||||
2181 | // tile won't be rendered. | ||||
2182 | bool drawTop = true; | ||||
2183 | if (topLeftRect.right() >= topRightRect.left()) { | ||||
2184 | const float halfOverlap = qAbs(topLeftRect.right() - topRightRect.left()) / 2; | ||||
2185 | topLeftRect.setRight(topLeftRect.right() - halfOverlap); | ||||
2186 | topRightRect.setLeft(topRightRect.left() + halfOverlap); | ||||
2187 | drawTop = false; | ||||
2188 | } | ||||
2189 | | ||||
2190 | bool drawRight = true; | ||||
2191 | if (topRightRect.bottom() >= bottomRightRect.top()) { | ||||
2192 | const float halfOverlap = qAbs(topRightRect.bottom() - bottomRightRect.top()) / 2; | ||||
2193 | topRightRect.setBottom(topRightRect.bottom() - halfOverlap); | ||||
2194 | bottomRightRect.setTop(bottomRightRect.top() + halfOverlap); | ||||
2195 | drawRight = false; | ||||
2196 | } | ||||
2197 | | ||||
2198 | bool drawBottom = true; | ||||
2199 | if (bottomLeftRect.right() >= bottomRightRect.left()) { | ||||
2200 | const float halfOverlap = qAbs(bottomLeftRect.right() - bottomRightRect.left()) / 2; | ||||
2201 | bottomLeftRect.setRight(bottomLeftRect.right() - halfOverlap); | ||||
2202 | bottomRightRect.setLeft(bottomRightRect.left() + halfOverlap); | ||||
2203 | drawBottom = false; | ||||
2204 | } | ||||
2205 | | ||||
2206 | bool drawLeft = true; | ||||
2207 | if (topLeftRect.bottom() >= bottomLeftRect.top()) { | ||||
2208 | const float halfOverlap = qAbs(topLeftRect.bottom() - bottomLeftRect.top()) / 2; | ||||
2209 | topLeftRect.setBottom(topLeftRect.bottom() - halfOverlap); | ||||
2210 | bottomLeftRect.setTop(bottomLeftRect.top() + halfOverlap); | ||||
2211 | drawLeft = false; | ||||
2212 | } | ||||
2213 | | ||||
2214 | qreal tx1 = 0.0, | ||||
2215 | tx2 = 0.0, | ||||
2216 | ty1 = 0.0, | ||||
2217 | ty2 = 0.0; | ||||
2168 | 2218 | | |||
2169 | qreal tx1(0.0), tx2(0.0), ty1(0.0), ty2(0.0); | 2219 | m_shadowQuads.clear(); | ||
2170 | 2220 | | |||
2171 | tx2 = topLeft.width()/width; | 2221 | tx1 = 0.0; | ||
2172 | ty2 = topLeft.height()/height; | 2222 | ty1 = 0.0; | ||
2223 | tx2 = topLeftRect.width() / width; | ||||
2224 | ty2 = topLeftRect.height() / height; | ||||
2173 | WindowQuad topLeftQuad(WindowQuadShadow); | 2225 | WindowQuad topLeftQuad(WindowQuadShadow); | ||
2174 | topLeftQuad[ 0 ] = WindowVertex(outerRect.x(), outerRect.y(), tx1, ty1); | 2226 | topLeftQuad[0] = WindowVertex(topLeftRect.left(), topLeftRect.top(), tx1, ty1); | ||
2175 | topLeftQuad[ 1 ] = WindowVertex(outerRect.x() + topLeft.width(), outerRect.y(), tx2, ty1); | 2227 | topLeftQuad[1] = WindowVertex(topLeftRect.right(), topLeftRect.top(), tx2, ty1); | ||
2176 | topLeftQuad[ 2 ] = WindowVertex(outerRect.x() + topLeft.width(), outerRect.y() + topLeft.height(), tx2, ty2); | 2228 | topLeftQuad[2] = WindowVertex(topLeftRect.right(), topLeftRect.bottom(), tx2, ty2); | ||
2177 | topLeftQuad[ 3 ] = WindowVertex(outerRect.x(), outerRect.y() + topLeft.height(), tx1, ty2); | 2229 | topLeftQuad[3] = WindowVertex(topLeftRect.left(), topLeftRect.bottom(), tx1, ty2); | ||
2178 | m_shadowQuads.append(topLeftQuad); | 2230 | m_shadowQuads.append(topLeftQuad); | ||
2179 | 2231 | | |||
2180 | tx1 = tx2; | 2232 | tx1 = 1.0 - topRightRect.width() / width; | ||
2181 | tx2 = (topLeft.width() + top.width())/width; | 2233 | ty1 = 0.0; | ||
2182 | ty2 = top.height()/height; | | |||
2183 | WindowQuad topQuad(WindowQuadShadow); | | |||
2184 | topQuad[ 0 ] = WindowVertex(outerRect.x() + topLeft.width(), outerRect.y(), tx1, ty1); | | |||
2185 | topQuad[ 1 ] = WindowVertex(outerRect.right() - topRight.width(), outerRect.y(), tx2, ty1); | | |||
2186 | topQuad[ 2 ] = WindowVertex(outerRect.right() - topRight.width(), outerRect.y() + top.height(),tx2, ty2); | | |||
2187 | topQuad[ 3 ] = WindowVertex(outerRect.x() + topLeft.width(), outerRect.y() + top.height(), tx1, ty2); | | |||
2188 | m_shadowQuads.append(topQuad); | | |||
2189 | | ||||
2190 | tx1 = tx2; | | |||
2191 | tx2 = 1.0; | 2234 | tx2 = 1.0; | ||
2192 | ty2 = topRight.height()/height; | 2235 | ty2 = topRightRect.height() / height; | ||
2193 | WindowQuad topRightQuad(WindowQuadShadow); | 2236 | WindowQuad topRightQuad(WindowQuadShadow); | ||
2194 | topRightQuad[ 0 ] = WindowVertex(outerRect.right() - topRight.width(), outerRect.y(), tx1, ty1); | 2237 | topRightQuad[0] = WindowVertex(topRightRect.left(), topRightRect.top(), tx1, ty1); | ||
2195 | topRightQuad[ 1 ] = WindowVertex(outerRect.right(), outerRect.y(), tx2, ty1); | 2238 | topRightQuad[1] = WindowVertex(topRightRect.right(), topRightRect.top(), tx2, ty1); | ||
2196 | topRightQuad[ 2 ] = WindowVertex(outerRect.right(), outerRect.y() + topRight.height(), tx2, ty2); | 2239 | topRightQuad[2] = WindowVertex(topRightRect.right(), topRightRect.bottom(), tx2, ty2); | ||
2197 | topRightQuad[ 3 ] = WindowVertex(outerRect.right() - topRight.width(), outerRect.y() + topRight.height(), tx1, ty2); | 2240 | topRightQuad[3] = WindowVertex(topRightRect.left(), topRightRect.bottom(), tx1, ty2); | ||
2198 | m_shadowQuads.append(topRightQuad); | 2241 | m_shadowQuads.append(topRightQuad); | ||
2199 | 2242 | | |||
2200 | tx1 = (width - right.width())/width; | 2243 | tx1 = 1.0 - bottomRightRect.width() / width; | ||
2201 | ty1 = topRight.height()/height; | 2244 | tx2 = 1.0; | ||
2202 | ty2 = (topRight.height() + right.height())/height; | 2245 | ty1 = 1.0 - bottomRightRect.height() / height; | ||
2203 | WindowQuad rightQuad(WindowQuadShadow); | | |||
2204 | rightQuad[ 0 ] = WindowVertex(outerRect.right() - right.width(), outerRect.y() + topRight.height(), tx1, ty1); | | |||
2205 | rightQuad[ 1 ] = WindowVertex(outerRect.right(), outerRect.y() + topRight.height(), tx2, ty1); | | |||
2206 | rightQuad[ 2 ] = WindowVertex(outerRect.right(), outerRect.bottom() - bottomRight.height(), tx2, ty2); | | |||
2207 | rightQuad[ 3 ] = WindowVertex(outerRect.right() - right.width(), outerRect.bottom() - bottomRight.height(), tx1, ty2); | | |||
2208 | m_shadowQuads.append(rightQuad); | | |||
2209 | | ||||
2210 | tx1 = (width - bottomRight.width())/width; | | |||
2211 | ty1 = ty2; | | |||
2212 | ty2 = 1.0; | 2246 | ty2 = 1.0; | ||
2213 | WindowQuad bottomRightQuad(WindowQuadShadow); | 2247 | WindowQuad bottomRightQuad(WindowQuadShadow); | ||
2214 | bottomRightQuad[ 0 ] = WindowVertex(outerRect.right() - bottomRight.width(), outerRect.bottom() - bottomRight.height(), tx1, ty1); | 2248 | bottomRightQuad[0] = WindowVertex(bottomRightRect.left(), bottomRightRect.top(), tx1, ty1); | ||
2215 | bottomRightQuad[ 1 ] = WindowVertex(outerRect.right(), outerRect.bottom() - bottomRight.height(), tx2, ty1); | 2249 | bottomRightQuad[1] = WindowVertex(bottomRightRect.right(), bottomRightRect.top(), tx2, ty1); | ||
2216 | bottomRightQuad[ 2 ] = WindowVertex(outerRect.right(), outerRect.bottom(), tx2, ty2); | 2250 | bottomRightQuad[2] = WindowVertex(bottomRightRect.right(), bottomRightRect.bottom(), tx2, ty2); | ||
2217 | bottomRightQuad[ 3 ] = WindowVertex(outerRect.right() - bottomRight.width(), outerRect.bottom(), tx1, ty2); | 2251 | bottomRightQuad[3] = WindowVertex(bottomRightRect.left(), bottomRightRect.bottom(), tx1, ty2); | ||
2218 | m_shadowQuads.append(bottomRightQuad); | 2252 | m_shadowQuads.append(bottomRightQuad); | ||
2219 | 2253 | | |||
2220 | tx2 = tx1; | 2254 | tx1 = 0.0; | ||
2255 | tx2 = bottomLeftRect.width() / width; | ||||
2256 | ty1 = 1.0 - bottomLeftRect.height() / height; | ||||
2257 | ty2 = 1.0; | ||||
2258 | WindowQuad bottomLeftQuad(WindowQuadShadow); | ||||
2259 | bottomLeftQuad[0] = WindowVertex(bottomLeftRect.left(), bottomLeftRect.top(), tx1, ty1); | ||||
2260 | bottomLeftQuad[1] = WindowVertex(bottomLeftRect.right(), bottomLeftRect.top(), tx2, ty1); | ||||
2261 | bottomLeftQuad[2] = WindowVertex(bottomLeftRect.right(), bottomLeftRect.bottom(), tx2, ty2); | ||||
2262 | bottomLeftQuad[3] = WindowVertex(bottomLeftRect.left(), bottomLeftRect.bottom(), tx1, ty2); | ||||
2263 | m_shadowQuads.append(bottomLeftQuad); | ||||
2264 | | ||||
2265 | if (drawTop) { | ||||
2266 | const QRectF topRect( | ||||
2267 | topLeftRect.topRight(), | ||||
2268 | topRightRect.bottomLeft()); | ||||
2269 | tx1 = topLeft.width() / width; | ||||
2270 | ty1 = 0.0; | ||||
2271 | tx2 = 1.0 - topRight.width() / width; | ||||
2272 | ty2 = topRect.height() / height; | ||||
2273 | WindowQuad topQuad(WindowQuadShadow); | ||||
2274 | topQuad[0] = WindowVertex(topRect.left(), topRect.top(), tx1, ty1); | ||||
2275 | topQuad[1] = WindowVertex(topRect.right(), topRect.top(), tx2, ty1); | ||||
2276 | topQuad[2] = WindowVertex(topRect.right(), topRect.bottom(), tx2, ty2); | ||||
2277 | topQuad[3] = WindowVertex(topRect.left(), topRect.bottom(), tx1, ty2); | ||||
2278 | m_shadowQuads.append(topQuad); | ||||
2279 | } | ||||
2280 | | ||||
2281 | if (drawRight) { | ||||
2282 | const QRectF rightRect( | ||||
2283 | topRightRect.bottomLeft(), | ||||
2284 | bottomRightRect.topRight()); | ||||
2285 | tx1 = 1.0 - rightRect.width() / width; | ||||
2286 | ty1 = topRight.height() / height; | ||||
2287 | tx2 = 1.0; | ||||
2288 | ty2 = 1.0 - bottomRight.height() / height; | ||||
2289 | WindowQuad rightQuad(WindowQuadShadow); | ||||
2290 | rightQuad[0] = WindowVertex(rightRect.left(), rightRect.top(), tx1, ty1); | ||||
2291 | rightQuad[1] = WindowVertex(rightRect.right(), rightRect.top(), tx2, ty1); | ||||
2292 | rightQuad[2] = WindowVertex(rightRect.right(), rightRect.bottom(), tx2, ty2); | ||||
2293 | rightQuad[3] = WindowVertex(rightRect.left(), rightRect.bottom(), tx1, ty2); | ||||
2294 | m_shadowQuads.append(rightQuad); | ||||
2295 | } | ||||
2296 | | ||||
2297 | if (drawBottom) { | ||||
2298 | const QRectF bottomRect( | ||||
2299 | bottomLeftRect.topRight(), | ||||
2300 | bottomRightRect.bottomLeft()); | ||||
2221 | tx1 = bottomLeft.width()/width; | 2301 | tx1 = bottomLeft.width() / width; | ||
2222 | ty1 = (height - bottom.height())/height; | 2302 | ty1 = 1.0 - bottomRect.height() / height; | ||
2303 | tx2 = 1.0 - bottomRight.width() / width; | ||||
2304 | ty2 = 1.0; | ||||
2223 | WindowQuad bottomQuad(WindowQuadShadow); | 2305 | WindowQuad bottomQuad(WindowQuadShadow); | ||
2224 | bottomQuad[ 0 ] = WindowVertex(outerRect.x() + bottomLeft.width(), outerRect.bottom() - bottom.height(), tx1, ty1); | 2306 | bottomQuad[0] = WindowVertex(bottomRect.left(), bottomRect.top(), tx1, ty1); | ||
2225 | bottomQuad[ 1 ] = WindowVertex(outerRect.right() - bottomRight.width(), outerRect.bottom() - bottom.height(), tx2, ty1); | 2307 | bottomQuad[1] = WindowVertex(bottomRect.right(), bottomRect.top(), tx2, ty1); | ||
2226 | bottomQuad[ 2 ] = WindowVertex(outerRect.right() - bottomRight.width(), outerRect.bottom(), tx2, ty2); | 2308 | bottomQuad[2] = WindowVertex(bottomRect.right(), bottomRect.bottom(), tx2, ty2); | ||
2227 | bottomQuad[ 3 ] = WindowVertex(outerRect.x() + bottomLeft.width(), outerRect.bottom(), tx1, ty2); | 2309 | bottomQuad[3] = WindowVertex(bottomRect.left(), bottomRect.bottom(), tx1, ty2); | ||
2228 | m_shadowQuads.append(bottomQuad); | 2310 | m_shadowQuads.append(bottomQuad); | ||
2311 | } | ||||
2229 | 2312 | | |||
2313 | if (drawLeft) { | ||||
2314 | const QRectF leftRect( | ||||
2315 | topLeftRect.bottomLeft(), | ||||
2316 | bottomLeftRect.topRight()); | ||||
2230 | tx1 = 0.0; | 2317 | tx1 = 0.0; | ||
2231 | tx2 = bottomLeft.width()/width; | | |||
2232 | ty1 = (height - bottomLeft.height())/height; | | |||
2233 | WindowQuad bottomLeftQuad(WindowQuadShadow); | | |||
2234 | bottomLeftQuad[ 0 ] = WindowVertex(outerRect.x(), outerRect.bottom() - bottomLeft.height(), tx1, ty1); | | |||
2235 | bottomLeftQuad[ 1 ] = WindowVertex(outerRect.x() + bottomLeft.width(), outerRect.bottom() - bottomLeft.height(), tx2, ty1); | | |||
2236 | bottomLeftQuad[ 2 ] = WindowVertex(outerRect.x() + bottomLeft.width(), outerRect.bottom(), tx2, ty2); | | |||
2237 | bottomLeftQuad[ 3 ] = WindowVertex(outerRect.x(), outerRect.bottom(), tx1, ty2); | | |||
2238 | m_shadowQuads.append(bottomLeftQuad); | | |||
2239 | | ||||
2240 | tx2 = left.width()/width; | | |||
2241 | ty2 = ty1; | | |||
2242 | ty1 = topLeft.height()/height; | 2318 | ty1 = topLeft.height() / height; | ||
2319 | tx2 = leftRect.width() / width; | ||||
2320 | ty2 = 1.0 - bottomRight.height() / height; | ||||
2243 | WindowQuad leftQuad(WindowQuadShadow); | 2321 | WindowQuad leftQuad(WindowQuadShadow); | ||
2244 | leftQuad[ 0 ] = WindowVertex(outerRect.x(), outerRect.y() + topLeft.height(), tx1, ty1); | 2322 | leftQuad[0] = WindowVertex(leftRect.left(), leftRect.top(), tx1, ty1); | ||
2245 | leftQuad[ 1 ] = WindowVertex(outerRect.x() + left.width(), outerRect.y() + topLeft.height(), tx2, ty1); | 2323 | leftQuad[1] = WindowVertex(leftRect.right(), leftRect.top(), tx2, ty1); | ||
2246 | leftQuad[ 2 ] = WindowVertex(outerRect.x() + left.width(), outerRect.bottom() - bottomLeft.height(), tx2, ty2); | 2324 | leftQuad[2] = WindowVertex(leftRect.right(), leftRect.bottom(), tx2, ty2); | ||
2247 | leftQuad[ 3 ] = WindowVertex(outerRect.x(), outerRect.bottom() - bottomLeft.height(), tx1, ty2); | 2325 | leftQuad[3] = WindowVertex(leftRect.left(), leftRect.bottom(), tx1, ty2); | ||
2248 | m_shadowQuads.append(leftQuad); | 2326 | m_shadowQuads.append(leftQuad); | ||
2249 | } | 2327 | } | ||
2328 | } | ||||
2250 | 2329 | | |||
2251 | bool SceneOpenGLShadow::prepareBackend() | 2330 | bool SceneOpenGLShadow::prepareBackend() | ||
2252 | { | 2331 | { | ||
2253 | if (hasDecorationShadow()) { | 2332 | if (hasDecorationShadow()) { | ||
2254 | // simplifies a lot by going directly to | 2333 | // simplifies a lot by going directly to | ||
2255 | effects->makeOpenGLContextCurrent(); | 2334 | effects->makeOpenGLContextCurrent(); | ||
2256 | m_texture = DecorationShadowTextureCache::instance().getTexture(this); | 2335 | m_texture = DecorationShadowTextureCache::instance().getTexture(this); | ||
2257 | 2336 | | |||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |
To explain why this was added: in KPart based applications it could happen that a menu is empty. In that case all we got was the shadow. IIRC kdevelop was able to trigger this.