From 6e54dbd00d24d807195cd0c9c3d22abe51138818 Mon Sep 17 00:00:00 2001 From: ut001910 Date: Wed, 26 Feb 2025 15:29:05 +0800 Subject: [PATCH] =?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: 缩略图居中显示 --- 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 daa4be70..d2974796 100644 --- a/libimageviewer/viewpanel/contents/imgviewdelegate.cpp +++ b/libimageviewer/viewpanel/contents/imgviewdelegate.cpp @@ -96,8 +96,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)));