From 0ab253efdfe43d7b8a5e0fb220ab5b6f2ae80a75 Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Tue, 12 Mar 2024 01:51:03 +0000 Subject: [PATCH] sync: from linuxdeepin/qt5integration Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: https://github.com/linuxdeepin/qt5integration/pull/213 --- styleplugins/chameleon/chameleonstyle.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/styleplugins/chameleon/chameleonstyle.cpp b/styleplugins/chameleon/chameleonstyle.cpp index 20e624f..c4bee5c 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); @@ -4358,7 +4358,8 @@ void ChameleonStyle::polish(QWidget *w) handle.setEnableBlurWindow(true); DPlatformTheme *theme = DGuiApplicationHelper::instance()->applicationTheme(); - setWindowRadius(w, qMax(0, qMin(theme->windowRadius(), 18))); + if (theme->isValid()) + setWindowRadius(w, qMax(0, qMin(theme->windowRadius(), 18))); connect(theme, &DPlatformTheme::windowRadiusChanged, w, [w](int r){ setWindowRadius(w, qMax(0, qMin(r, 18)));