From 80e04f2fbfc4f403c0bfcdfad22ce1f574b95324 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 25 Jan 2021 12:49:38 -0500 Subject: [PATCH] 2021-01-25 Fred Gleason * Fixed a bug in 'RDFeedListModel' that caused feed icons to fail to be scaled correctly. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdfeedlistmodel.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1291556..33af0b1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20898,3 +20898,6 @@ 2021-01-25 Fred Gleason * Refactored the 'List Feed' dialog in rdadmin(1) to use the model-based API. +2021-01-25 Fred Gleason + * Fixed a bug in 'RDFeedListModel' that caused feed icons to fail + to be scaled correctly. diff --git a/lib/rdfeedlistmodel.cpp b/lib/rdfeedlistmodel.cpp index 56ee549b..50321ee0 100644 --- a/lib/rdfeedlistmodel.cpp +++ b/lib/rdfeedlistmodel.cpp @@ -37,7 +37,7 @@ RDFeedListModel::RDFeedListModel(bool is_admin,QObject *parent) // unsigned left=Qt::AlignLeft|Qt::AlignVCenter; unsigned center=Qt::AlignCenter; - unsigned right=Qt::AlignRight|Qt::AlignVCenter; + // unsigned right=Qt::AlignRight|Qt::AlignVCenter; d_headers.push_back(tr("Key Name")); // 00 d_alignments.push_back(left); @@ -546,7 +546,9 @@ void RDFeedListModel::updateRow(int row,RDSqlQuery *q) applicationIcon(RDIconEngine::RdCastManager,32); } else { - d_icons[row][0]=QImage::fromData(q->value(12).toByteArray()); + d_icons[row][0]= + QImage::fromData(q->value(12).toByteArray()). + scaled(32,32,Qt::IgnoreAspectRatio,Qt::SmoothTransformation); } d_texts[row][1]=q->value(2); // Title if(q->value(3).toString()=="Y") {