From 85bf8454c168e9ad5cc7ca7d28dac681351ca78d Mon Sep 17 00:00:00 2001 From: ut001910 Date: Wed, 26 Feb 2025 15:29:05 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E7=BC=A9=E7=95=A5=E5=9B=BE=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 缩略图居中显示 Bug: https://pms.uniontech.com/bug-view-280001.html Log: 缩略图居中显示 v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html --- libimageviewer/viewpanel/contents/imgviewdelegate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libimageviewer/viewpanel/contents/imgviewdelegate.cpp b/libimageviewer/viewpanel/contents/imgviewdelegate.cpp index f84c96bc..acfd1dd0 100644 --- a/libimageviewer/viewpanel/contents/imgviewdelegate.cpp +++ b/libimageviewer/viewpanel/contents/imgviewdelegate.cpp @@ -92,8 +92,8 @@ void LibImgViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op QPainter::Antialiasing); QRect backgroundRect = option.rect; if (backgroundRect.width() != LibImgViewListView::ITEM_CURRENT_WH) { - backgroundRect.setTopLeft(QPoint(backgroundRect.topLeft() + QPoint(0, NORMAL_ITEM_PAINT_OFFSET))); - backgroundRect.setBottomRight(QPoint(backgroundRect.bottomRight() + QPoint(0, NORMAL_ITEM_PAINT_OFFSET))); + backgroundRect.setTopLeft(QPoint(backgroundRect.topLeft() + QPoint(0, NORMAL_ITEM_PAINT_OFFSET + 3))); + backgroundRect.setBottomRight(QPoint(backgroundRect.bottomRight() + QPoint(0, NORMAL_ITEM_PAINT_OFFSET + 3))); } else { backgroundRect.setTopLeft(QPoint(backgroundRect.topLeft() + QPoint(0, SELECT_ITEM_PAINT_OFFSET))); backgroundRect.setBottomRight(QPoint(backgroundRect.bottomRight() + QPoint(0, SELECT_ITEM_PAINT_OFFSET))); From 4cc0a5c9663ea5838d7f8b72b78b7bc9e996685f Mon Sep 17 00:00:00 2001 From: ut001910 Date: Tue, 1 Apr 2025 16:43:07 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?750=20X=207882=E5=B0=BA=E5=AF=B8=E5=9B=BE=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复查看750 X 7882尺寸图片问题 Bug: https://pms.uniontech.com/bug-view-310713.html Log: 修复查看750 X 7882尺寸图片问题 v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html --- libimageviewer/unionimage/unionimage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libimageviewer/unionimage/unionimage.cpp b/libimageviewer/unionimage/unionimage.cpp index 3b7f248f..e5a1dd65 100644 --- a/libimageviewer/unionimage/unionimage.cpp +++ b/libimageviewer/unionimage/unionimage.cpp @@ -266,6 +266,12 @@ UNIONIMAGESHARED_EXPORT bool loadStaticImageFromFile(const QString &path, QImage QImageReader reader; QImage res_qt; reader.setFileName(path); + //当不能读取数据时,设置以内容判断格式进行加载,这样可以避免后缀名修改后文件无法打开的情况 + if (!reader.canRead()) { + reader.setAutoDetectImageFormat(true); //控制是否通过内容识别格式 + reader.setDecideFormatFromContent(true); // 根据内容识别格式 + reader.setFileName(path); //必须重新设置一下文件,才能触发内部加载方式的切换 + } if (format_bar.isEmpty()) { reader.setFormat(file_suffix_lower.toLatin1()); } else { From 457c2a62ca679958b2c488bf9812ad98dc526f6d Mon Sep 17 00:00:00 2001 From: myk1343 <75473184+myk1343@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:01:53 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E9=80=82=E9=85=8D103x=E7=BC=96?= =?UTF-8?q?=E8=AF=91=20(#160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 适配103x编译 task: https://pms.uniontech.com/task-view-365161.html Log: 适配103x编译 v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html --- libimageviewer/quickprint/quickprint.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libimageviewer/quickprint/quickprint.cpp b/libimageviewer/quickprint/quickprint.cpp index 5d5803b2..0ced6042 100644 --- a/libimageviewer/quickprint/quickprint.cpp +++ b/libimageviewer/quickprint/quickprint.cpp @@ -129,14 +129,19 @@ int QuickPrintPrivate::showPrintDialog(QWidget *parentWidget) qInfo() << "Showing print dialog for" << loadDataList.size() << "images"; DPrintPreviewDialog printDialog(parentWidget); printDialog.setObjectName("QuickPrint_PrintDialog"); +#if DTK_VERSION > DTK_VERSION_CHECK(5, 4, 10, 0) printDialog.setAsynPreview(loadDataList.size()); // 设置打印文件名,用于 Cups 服务记录打印任务 printDialog.setDocName(loadDataList.first()->filePath); connect(&printDialog, - QOverload &>::of(&DPrintPreviewDialog::paintRequested), - this, - &QuickPrintPrivate::asyncPrint); + QOverload &>::of(&DPrintPreviewDialog::paintRequested), + this, + &QuickPrintPrivate::asyncPrint); +#else + connect(&printDialog, SIGNAL(paintRequested(DPrinter *)), + this, SLOT(paintRequestSync(DPrinter *))); +#endif return printDialog.exec(); } From 83520d45c753db46187014dbdf5f202acd3f3a1e Mon Sep 17 00:00:00 2001 From: ut001910 Date: Fri, 9 May 2025 16:41:20 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=B8=8D=E8=AF=86=E5=88=AB=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E7=BC=80=E7=9A=84=E5=9B=BE=E7=89=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复右键打印不识别改后缀的图片问题 Bug: https://pms.uniontech.com/bug-view-315823.html Log: 修复右键打印不识别改后缀的图片问题 v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html --- libimageviewer/quickprint/printimageloader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libimageviewer/quickprint/printimageloader.cpp b/libimageviewer/quickprint/printimageloader.cpp index 8153b713..d492c4ed 100644 --- a/libimageviewer/quickprint/printimageloader.cpp +++ b/libimageviewer/quickprint/printimageloader.cpp @@ -283,6 +283,11 @@ bool PrintImageLoader::loadImageData(PrintImageData::Ptr &imagePtr) reader.jumpToImage(imagePtr->frame); } + if (!reader.canRead()) { + reader.setAutoDetectImageFormat(true); //控制是否通过内容识别格式 + reader.setDecideFormatFromContent(true); // 根据内容识别格式 + reader.setFileName(imagePtr->filePath); //必须重新设置一下文件,才能触发内部加载方式的切换 + } if (!reader.canRead()) { qWarning() << QString("Load multi frame image failed(jump to image): %1").arg(reader.errorString()); imagePtr->state = ContentError; From 52e37f14e74bdb6f035ec826aa17ce55ac33bedf Mon Sep 17 00:00:00 2001 From: GongHeng Date: Wed, 13 Aug 2025 10:15:28 +0800 Subject: [PATCH 5/5] fix: [slide-show] The Next button should clicked double. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- The Next button should clicked double. -- The last animation not stop and logic return. Log: fix issue Bug: https://pms.uniontech.com/bug-view-328371.html v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html --- libimageviewer/slideshow/imageanimation.cpp | 33 ++++++++++++++------- libimageviewer/unionimage/unionimage.cpp | 2 +- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/libimageviewer/slideshow/imageanimation.cpp b/libimageviewer/slideshow/imageanimation.cpp index fe0b8734..4fa72826 100644 --- a/libimageviewer/slideshow/imageanimation.cpp +++ b/libimageviewer/slideshow/imageanimation.cpp @@ -119,6 +119,7 @@ class LibImageAnimationPrivate : public QWidget void startSingleNextAnimation(); void startSinglePreAnimation(); void startStatic(); + void forceStopCurrentAnimation(); void endSlide() { if (m_staticTimer) { @@ -545,12 +546,11 @@ void LibImageAnimationPrivate::startSingleNextAnimation() qDebug() << "Starting single next animation"; if (m_isAnimationIng) { qDebug() << "Animation already in progress, stopping"; - m_isAnimationIng = false; - } else { - setImage1(m_imageName2); - setImage2(queue->jumpTonext()); - startAnimation(); + forceStopCurrentAnimation(); } + setImage1(m_imageName2); + setImage2(queue->jumpTonext()); + startAnimation(); } void LibImageAnimationPrivate::startSinglePreAnimation() @@ -558,12 +558,11 @@ void LibImageAnimationPrivate::startSinglePreAnimation() qDebug() << "Starting single previous animation"; if (m_isAnimationIng) { qDebug() << "Animation already in progress, stopping"; - m_isAnimationIng = false; - } else { - setImage1(m_imageName2); - setImage2(queue->jumpTopre()); - startAnimation(); + forceStopCurrentAnimation(); } + setImage1(m_imageName2); + setImage2(queue->jumpTopre()); + startAnimation(); } void LibImageAnimationPrivate::startStatic() @@ -578,6 +577,20 @@ void LibImageAnimationPrivate::startStatic() m_staticTimer->start(SLIDER_TIME); } +void LibImageAnimationPrivate::forceStopCurrentAnimation() +{ + if (m_continuousanimationTimer) { + m_continuousanimationTimer->stop(); + m_continuousanimationTimer->setInterval(0); + m_factor = 0.0f; + m_isAnimationIng = false; + } + if (m_staticTimer) { + m_staticTimer->stop(); + m_staticTimer->setInterval(0); + } +} + void LibImageAnimationPrivate::onContinuousAnimationTimer() { Q_Q(LibImageAnimation); diff --git a/libimageviewer/unionimage/unionimage.cpp b/libimageviewer/unionimage/unionimage.cpp index e5a1dd65..0d5ad125 100644 --- a/libimageviewer/unionimage/unionimage.cpp +++ b/libimageviewer/unionimage/unionimage.cpp @@ -24,7 +24,7 @@ #include "unionimage/imageutils.h" extern "C" { -#include "3rdparty/tiff-tools/converttiff.h" +#include "../../3rdparty/tiff-tools/converttiff.h" } #include