Changeset View
Changeset View
Standalone View
Standalone View
lib/thumbnailview/previewitemdelegate.cpp
Context not available. | |||||
306 | painter->setPen(borderColor); | 306 | painter->setPen(borderColor); | ||
---|---|---|---|---|---|
307 | painter->drawPath(path); | 307 | painter->drawPath(path); | ||
308 | 308 | | |||
309 | qreal dpr = qApp->devicePixelRatio(); | ||||
309 | painter->setPen(PaintUtils::adjustedHsv(borderColor, borderH, borderS, borderV)); | 310 | painter->setPen(PaintUtils::adjustedHsv(borderColor, borderH, borderS, borderV)); | ||
310 | rectF = rectF.adjusted(borderMargin, borderMargin, -borderMargin, -borderMargin); | 311 | rectF = rectF.adjusted(borderMargin / dpr, borderMargin / dpr, -borderMargin / dpr, -borderMargin / dpr); | ||
311 | path = PaintUtils::roundedRectangle(rectF, SELECTION_RADIUS); | 312 | path = PaintUtils::roundedRectangle(rectF, SELECTION_RADIUS); | ||
312 | painter->drawPath(path); | 313 | painter->drawPath(path); | ||
313 | } | 314 | } | ||
Context not available. | |||||
718 | fgColor = viewport->palette().color(viewport->foregroundRole()); | 719 | fgColor = viewport->palette().color(viewport->foregroundRole()); | ||
719 | 720 | | |||
720 | // Compute thumbnailRect | 721 | // Compute thumbnailRect | ||
722 | qreal dpr = qApp->devicePixelRatio(); | ||||
721 | QRect thumbnailRect = QRect( | 723 | QRect thumbnailRect = QRect( | ||
722 | rect.left() + (rect.width() - thumbnailPix.width()) / 2, | 724 | rect.left() + (rect.width() - thumbnailPix.width() / dpr) / 2, | ||
723 | rect.top() + (thumbnailHeight - thumbnailPix.height()) + ITEM_MARGIN, | 725 | rect.top() + (thumbnailHeight - thumbnailPix.height() / dpr) + ITEM_MARGIN, | ||
724 | thumbnailPix.width(), | 726 | thumbnailPix.width() / dpr, | ||
725 | thumbnailPix.height()); | 727 | thumbnailPix.height() / dpr); | ||
726 | 728 | | |||
727 | // Draw background | 729 | // Draw background | ||
728 | const QRect backgroundRect = thumbnailRect.adjusted(-ITEM_MARGIN, -ITEM_MARGIN, ITEM_MARGIN, ITEM_MARGIN); | 730 | const QRect backgroundRect = thumbnailRect.adjusted(-ITEM_MARGIN, -ITEM_MARGIN, ITEM_MARGIN, ITEM_MARGIN); | ||
Context not available. |