Commit 3b82901e authored by Maik Qualmann's avatar Maik Qualmann
Browse files

info icons over thumbnails now scaled

CCBUGS: 261568
parent 46a3c20c
......@@ -92,10 +92,10 @@ void DigikamImageDelegate::updateRects()
d->drawImageFormat = albumSettings->getIconShowImageFormat();
d->drawCoordinates = ApplicationSettings::instance()->getIconShowCoordinates();
const int iconSize = KIconLoader::SizeSmallMedium;
const int iconSize = qBound(16, (d->contentWidth + 2*d->margin) / 8 - 2, 48);
d->pickLabelRect = QRect(d->margin, y, iconSize, iconSize);
d->groupRect = QRect(d->contentWidth - iconSize, y, iconSize, iconSize);
d->coordinatesRect = QRect(d->contentWidth - KIconLoader::SizeSmall+2, d->pixmapRect.top(), KIconLoader::SizeSmall, KIconLoader::SizeSmall);
d->coordinatesRect = QRect(d->contentWidth - iconSize+2, d->pixmapRect.top(), iconSize, iconSize);
if (albumSettings->getIconShowRating())
{
......
......@@ -118,9 +118,10 @@ void ImageThumbnailDelegate::updateRects()
{
Q_D(ImageThumbnailDelegate);
d->coordinatesRect = QRect(d->contentWidth - KIconLoader::SizeSmall+2, d->pixmapRect.top(), KIconLoader::SizeSmall, KIconLoader::SizeSmall);
d->pixmapRect = QRect(d->margin, d->margin, d->contentWidth, d->contentWidth);
d->rect = QRect(0, 0, d->contentWidth + 2*d->margin, d->contentWidth + 2*d->margin);
d->pixmapRect = QRect(d->margin, d->margin, d->contentWidth, d->contentWidth);
const int iconSize = qBound(16, (d->contentWidth + 2*d->margin) / 8 - 2, 48);
d->coordinatesRect = QRect(d->contentWidth - iconSize+2, d->pixmapRect.top(), iconSize, iconSize);
d->drawImageFormat = ApplicationSettings::instance()->getIconShowImageFormat();
d->drawCoordinates = ApplicationSettings::instance()->getIconShowCoordinates();
......
......@@ -492,7 +492,7 @@ void ItemViewImageDelegate::drawPanelSideIcon(QPainter* p, bool left, bool right
{
Q_D(const ItemViewImageDelegate);
int iconSize = KIconLoader::SizeSmall;
const int iconSize = qBound(16, d->rect.width() / 8 - 2, 48);
if (left)
{
......@@ -513,7 +513,7 @@ void ItemViewImageDelegate::drawGeolocationIndicator(QPainter* p, const QRect& r
{
if (!r.isNull())
{
QIcon icon = KIconLoader::global()->loadIcon("applications-internet", KIconLoader::NoGroup, KIconLoader::SizeSmall);
QIcon icon = KIconLoader::global()->loadIcon("applications-internet", KIconLoader::NoGroup, r.width());
qreal op = p->opacity();
p->setOpacity(0.5);
icon.paint(p, r);
......
......@@ -670,7 +670,7 @@ void ImportThumbnailDelegate::updateRects()
d->drawImageFormat = ImportSettings::instance()->getIconShowImageFormat();
d->drawCoordinates = ImportSettings::instance()->getIconShowCoordinates();
const int iconSize = KIconLoader::SizeSmall;
const int iconSize = qBound(16, (d->contentWidth + 2*d->margin) / 8 - 2, 48);
int pos = iconSize + 2;
d->downloadRect = QRect(d->contentWidth - pos, d->pixmapRect.top(), iconSize, iconSize);
pos += iconSize;
......@@ -741,7 +741,7 @@ void ImportNormalDelegate::updateRects()
const ImportSettings* const importSettings = ImportSettings::instance();
d->drawImageFormat = importSettings->getIconShowImageFormat();
d->drawCoordinates = ImportSettings::instance()->getIconShowCoordinates();
const int iconSize = KIconLoader::SizeSmall;
const int iconSize = qBound(16, (d->contentWidth + 2*d->margin) / 8 - 2, 48);
d->pickLabelRect = QRect(d->margin, y, iconSize, iconSize);
// d->groupRect = QRect(d->contentWidth - iconSize, y, iconSize, iconSize); // TODO
......
......@@ -437,7 +437,7 @@ void ItemViewImportDelegate::drawGeolocationIndicator(QPainter* p, const QRect&
{
if (!r.isNull())
{
QIcon icon = KIconLoader::global()->loadIcon("applications-internet", KIconLoader::NoGroup, KIconLoader::SizeSmall);
QIcon icon = KIconLoader::global()->loadIcon("applications-internet", KIconLoader::NoGroup, r.width());
qreal op = p->opacity();
p->setOpacity(0.5);
icon.paint(p, r);
......@@ -451,17 +451,17 @@ void ItemViewImportDelegate::drawDownloadIndicator(QPainter* p, const QRect& r,
if (itemType == CamItemInfo::DownloadUnknown)
{
icon = KIconLoader::global()->loadIcon("dialog-information", KIconLoader::NoGroup, KIconLoader::SizeSmall);
icon = KIconLoader::global()->loadIcon("dialog-information", KIconLoader::NoGroup, r.width());
}
if (itemType == CamItemInfo::DownloadedNo) // TODO: CamItemInfo::NewPicture
{
icon = KIconLoader::global()->loadIcon("favorites", KIconLoader::NoGroup, KIconLoader::SizeSmall);
icon = KIconLoader::global()->loadIcon("favorites", KIconLoader::NoGroup, r.width());
}
if (itemType == CamItemInfo::DownloadedYes)
{
icon = KIconLoader::global()->loadIcon("dialog-ok", KIconLoader::NoGroup, KIconLoader::SizeSmall);
icon = KIconLoader::global()->loadIcon("dialog-ok", KIconLoader::NoGroup, r.width());
}
qreal op = p->opacity();
......@@ -482,7 +482,7 @@ void ItemViewImportDelegate::drawLockIndicator(QPainter* p, const QRect& r, int
if (lockStatus == 0)
{
icon = KIconLoader::global()->loadIcon("object-locked", KIconLoader::NoGroup, KIconLoader::SizeSmall);
icon = KIconLoader::global()->loadIcon("object-locked", KIconLoader::NoGroup, r.width());
}
qreal op = p->opacity();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment