Changeset View
Changeset View
Standalone View
Standalone View
libkcardgame/kcard.cpp
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Line(s) | |||||
307 | } | 307 | } | ||
308 | 308 | | |||
309 | 309 | | |||
310 | void KCard::paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget ) | 310 | void KCard::paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget ) | ||
311 | { | 311 | { | ||
312 | Q_UNUSED( option ); | 312 | Q_UNUSED( option ); | ||
313 | Q_UNUSED( widget ); | 313 | Q_UNUSED( widget ); | ||
314 | 314 | | |||
315 | if ( pixmap().size() != d->deck->cardSize() ) | 315 | if ( pixmap().size() != d->deck->cardSize() * pixmap().devicePixelRatio() ) | ||
316 | { | 316 | { | ||
317 | QPixmap newPix = d->deck->cardPixmap( d->id, d->faceUp ); | 317 | QPixmap newPix = d->deck->cardPixmap( d->id, d->faceUp ); | ||
318 | if ( d->faceUp ) | 318 | if ( d->faceUp ) | ||
319 | setFrontPixmap( newPix ); | 319 | setFrontPixmap( newPix ); | ||
320 | else | 320 | else | ||
321 | setBackPixmap( newPix ); | 321 | setBackPixmap( newPix ); | ||
322 | 322 | | |||
323 | // Changing the pixmap will call update() and force a repaint, so we | 323 | // Changing the pixmap will call update() and force a repaint, so we | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |