Changeset View
Changeset View
Standalone View
Standalone View
kstyle/oxygenshadowhelper.cpp
Show First 20 Lines • Show All 318 Lines • ▼ Show 20 Line(s) | 281 | { | |||
---|---|---|---|---|---|
319 | shadow->create(); | 319 | shadow->create(); | ||
320 | } | 320 | } | ||
321 | 321 | | |||
322 | //_______________________________________________________ | 322 | //_______________________________________________________ | ||
323 | QMargins ShadowHelper::shadowMargins( QWidget* widget ) const | 323 | QMargins ShadowHelper::shadowMargins( QWidget* widget ) const | ||
324 | { | 324 | { | ||
325 | // const qreal devicePixelRatio( _helper.devicePixelRatio( isDockWidget ? | 325 | // const qreal devicePixelRatio( _helper.devicePixelRatio( isDockWidget ? | ||
326 | // _dockTiles.pixmap( 0 ):_tiles.pixmap( 0 ) ) ); | 326 | // _dockTiles.pixmap( 0 ):_tiles.pixmap( 0 ) ) ); | ||
327 | #if QT_VERSION >= 0x050300 | | |||
328 | const qreal devicePixelRatio( qApp->devicePixelRatio() ); | 327 | const qreal devicePixelRatio( qApp->devicePixelRatio() ); | ||
329 | #else | | |||
330 | const qreal devicePixelRatio( 1.0 ); | | |||
331 | #endif | | |||
332 | 328 | | |||
333 | // add padding | 329 | // add padding | ||
334 | /* | 330 | /* | ||
335 | in most cases all 4 paddings are identical, since offsets are handled when generating the pixmaps. | 331 | in most cases all 4 paddings are identical, since offsets are handled when generating the pixmaps. | ||
336 | There is one extra pixel needed with respect to actual shadow size, to deal with how | 332 | There is one extra pixel needed with respect to actual shadow size, to deal with how | ||
337 | menu backgrounds are rendered. | 333 | menu backgrounds are rendered. | ||
338 | Some special care is needed for QBalloonTip, since the later have an arrow | 334 | Some special care is needed for QBalloonTip, since the later have an arrow | ||
339 | */ | 335 | */ | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |