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#210
  • Loading branch information
deepin-ci-robot committed Jan 22, 2024
1 parent 9e98822 commit 1cb6011
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions styleplugins/chameleon/chameleonstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4354,11 +4354,13 @@ 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)));
});
}

connect(theme, &DPlatformTheme::windowRadiusChanged, w, [w](int r){
setWindowRadius(w, qMax(0, qMin(r, 18)));
});
w->setAttribute(Qt::WA_TranslucentBackground);
connect(DWindowManagerHelper::instance(), SIGNAL(hasCompositeChanged()), w, SLOT(update()));
}
Expand Down

0 comments on commit 1cb6011

Please sign in to comment.