Skip to content

Commit

Permalink
sync: from linuxdeepin/qt5integration
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#213
  • Loading branch information
deepin-ci-robot committed Mar 12, 2024
1 parent 287e168 commit 0ab253e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions styleplugins/chameleon/chameleonstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit 0ab253e

Please sign in to comment.