Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezeshadowhelper.cpp
Show First 20 Lines • Show All 371 Lines • ▼ Show 20 Line(s) | 358 | { | |||
---|---|---|---|---|---|
372 | const QVector<KWindowShadowTile::Ptr>& tiles = createShadowTiles(); | 372 | const QVector<KWindowShadowTile::Ptr>& tiles = createShadowTiles(); | ||
373 | if( tiles.count() != numTiles ) return; | 373 | if( tiles.count() != numTiles ) return; | ||
374 | 374 | | |||
375 | // find a shadow associated with the widget | 375 | // find a shadow associated with the widget | ||
376 | KWindowShadow*& shadow = _shadows[ widget ]; | 376 | KWindowShadow*& shadow = _shadows[ widget ]; | ||
377 | 377 | | |||
378 | // we want the shadow to be deleted after the decorated window is destroyed | 378 | // we want the shadow to be deleted after the decorated window is destroyed | ||
379 | if( !shadow ) | 379 | if( !shadow ) | ||
380 | { shadow = new KWindowShadow( widget->windowHandle() ); } | 380 | { | ||
381 | shadow = new KWindowShadow( widget->windowHandle() ); | ||||
382 | | ||||
383 | connect( shadow, &QObject::destroyed, this, [this, widget] { _shadows.remove( widget ); } ); | ||||
384 | } | ||||
381 | 385 | | |||
382 | if( shadow->isCreated() ) | 386 | if( shadow->isCreated() ) | ||
383 | { shadow->destroy(); } | 387 | { shadow->destroy(); } | ||
384 | 388 | | |||
385 | shadow->setTopTile( tiles[ 0 ] ); | 389 | shadow->setTopTile( tiles[ 0 ] ); | ||
386 | shadow->setTopRightTile( tiles[ 1 ] ); | 390 | shadow->setTopRightTile( tiles[ 1 ] ); | ||
387 | shadow->setRightTile( tiles[ 2 ] ); | 391 | shadow->setRightTile( tiles[ 2 ] ); | ||
388 | shadow->setBottomRightTile( tiles[ 3 ] ); | 392 | shadow->setBottomRightTile( tiles[ 3 ] ); | ||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |