Skip to content

Commit

Permalink
chore: use hasBlurWindow instead of hasComposite
Browse files Browse the repository at this point in the history
hasBlurWindow is more accurate
  • Loading branch information
kegechen committed Jan 30, 2024
1 parent 0a97de2 commit 535d287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/dblureffectwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ QColor DBlurEffectWidgetPrivate::getMaskColor(const QColor &baseColor) const

int maskAlpha = this->getMaskColorAlpha();

if (!isBehindWindowBlendMode() || DWindowManagerHelper::instance()->hasComposite()) {
if (!isBehindWindowBlendMode() || DWindowManagerHelper::instance()->hasBlurWindow()) {
color.setAlpha(maskAlpha);
} else {
return ct == DGuiApplicationHelper::DarkType ? "#202020" : "#D2D2D2";
Expand All @@ -158,7 +158,7 @@ void DBlurEffectWidgetPrivate::setMaskColor(const QColor &color)
maskColor = color;

if (isBehindWindowBlendMode()) {
maskColor.setAlpha(DWindowManagerHelper::instance()->hasComposite() ? getMaskColorAlpha() : MASK_COLOR_ALPHA_DEFAULT);
maskColor.setAlpha(DWindowManagerHelper::instance()->hasBlurWindow() ? getMaskColorAlpha() : MASK_COLOR_ALPHA_DEFAULT);
}

D_Q(DBlurEffectWidget);
Expand Down

0 comments on commit 535d287

Please sign in to comment.