Skip to content

Commit

Permalink
chore: [dtk] adapter blurEffectWidget
Browse files Browse the repository at this point in the history
[dtk] adapter blurEffectWidget

Log: [dtk] adapter blurEffectWidget
Task: https://pms.uniontech.com/task-view-331537.html
  • Loading branch information
pppanghu77 authored and deepin-bot[bot] committed Mar 20, 2024
1 parent e0d0205 commit e286a06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/grand-search/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MainWindowPrivate::MainWindowPrivate(MainWindow *parent)
}

MainWindow::MainWindow(QWidget *parent)
: DBlurEffectWidget(parent)
: DEffectWidget(parent)
, d_p(new MainWindowPrivate(this))
{
initUI();
Expand All @@ -46,7 +46,7 @@ MainWindow::MainWindow(QWidget *parent)
void MainWindow::mousePressEvent(QMouseEvent *event)
{
activeMainWindow();
return DBlurEffectWidget::mousePressEvent(event);
return DEffectWidget::mousePressEvent(event);
}

MainWindow::~MainWindow()
Expand Down Expand Up @@ -194,7 +194,7 @@ void MainWindow::initUI()
onPrimaryScreenChanged(screen);

// 模糊模式
setBlendMode(DBlurEffectWidget::BehindWindowBlend);
setBlendMode(DEffectWidget::BehindWindowBlend);

// 搜索入口界面
d_p->m_entranceWidget = new EntranceWidget(this);
Expand Down Expand Up @@ -275,7 +275,7 @@ void MainWindow::showEvent(QShowEvent *event)

d_p->m_handleVisibility->registerRegion(true);

return DBlurEffectWidget::showEvent(event);
return DEffectWidget::showEvent(event);
}

void MainWindow::hideEvent(QHideEvent *event)
Expand All @@ -284,12 +284,12 @@ void MainWindow::hideEvent(QHideEvent *event)

d_p->m_handleVisibility->registerRegion(false);

return DBlurEffectWidget::hideEvent(event);
return DEffectWidget::hideEvent(event);
}

void MainWindow::closeEvent(QCloseEvent *event)
{
// 通知查询控制器停止搜索
emit terminateSearch();
return DBlurEffectWidget::closeEvent(event);
return DEffectWidget::closeEvent(event);
}
13 changes: 10 additions & 3 deletions src/grand-search/gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <DBlurEffectWidget>

#include <QScopedPointer>
#include <dtkwidget_config.h>

#ifdef DTKWIDGET_CLASS_DBlurEffectWithBorderWidget
#include <DBlurEffectWithBorderWidget>
typedef Dtk::Widget::DBlurEffectWithBorderWidget DEffectWidget;
#else
#include <DBlurEffectWidget>
typedef Dtk::Widget::DBlurEffectWidget DEffectWidget;
#endif

namespace GrandSearch {

class MainWindowPrivate;
class MainWindow : public Dtk::Widget::DBlurEffectWidget
class MainWindow : public DEffectWidget
{
Q_OBJECT
public:
Expand Down

0 comments on commit e286a06

Please sign in to comment.