From 6e1c14b27fdd292395fe5c40ecb07a33c64884f6 Mon Sep 17 00:00:00 2001 From: wangfei Date: Tue, 12 Mar 2024 09:49:39 +0800 Subject: [PATCH] fix: icon size of the selected item in context menu change the icon size of the selected item in context menu according to the suggestion from the designer Issue: https://github.com/linuxdeepin/developer-center/issues/7446 --- styleplugins/chameleon/chameleonstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/styleplugins/chameleon/chameleonstyle.cpp b/styleplugins/chameleon/chameleonstyle.cpp index 91a1a890..c4bee5ce 100644 --- a/styleplugins/chameleon/chameleonstyle.cpp +++ b/styleplugins/chameleon/chameleonstyle.cpp @@ -2954,8 +2954,8 @@ bool ChameleonStyle::drawMenuItem(const QStyleOptionMenuItem *option, QPainter * if (checkable) { checkRect.setLeft(frameRadius); - checkRect.setWidth(smallIconSize); - checkRect.setHeight(smallIconSize); + checkRect.setWidth(smallIconSize - 2); + checkRect.setHeight(smallIconSize - 4); checkRect.moveCenter(QPoint(checkRect.left() + smallIconSize / 2, menuItem->rect.center().y())); painter->setRenderHint(QPainter::Antialiasing);