Skip to content

Commit 081a60c

Browse files
committed
fix: prevent window manager from disabling blur on Quake window
Set minimumHeight to 2 instead of 0 to prevent the window manager from forcibly disabling the blur effect on the Quake terminal window. Sync from master commit #323. Log: 修复雷神窗口无法设置模糊的问题 Influence: 保持雷神窗口的模糊效果
1 parent 31f5673 commit 081a60c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,15 +3383,15 @@ void QuakeWindow::topToBottomAnimation()
33833383
return;
33843384

33853385
isNotAnimation = false;
3386-
this->setMinimumHeight(0);//设置最小高度为0,让动画效果流畅
3386+
this->setMinimumHeight(2); // 避免窗管强制取消模糊。
33873387
currentPage()->setMinimumHeight(currentPage()->height());//设置page的最小高度,让动画效果时,page上信息不因为外框的变小而变小
33883388

33893389
//动画代码
33903390
QPropertyAnimation *m_heightAni = new QPropertyAnimation(this, "height");
33913391
m_heightAni->setEasingCurve(QEasingCurve::Linear);
33923392
int durationTime = getQuakeAnimationTime();
33933393
m_heightAni->setDuration(durationTime);
3394-
m_heightAni->setStartValue(1);
3394+
m_heightAni->setStartValue(2);
33953395
m_heightAni->setEndValue(getQuakeHeight());
33963396
m_heightAni->start(QAbstractAnimation::DeleteWhenStopped);
33973397

0 commit comments

Comments
 (0)