From 4ed9b915f96a2368fb470d15b0dbea6398419e9b Mon Sep 17 00:00:00 2001 From: donghualin Date: Mon, 9 Jan 2023 19:18:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AB=98=E6=95=88=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E6=9C=80=E5=8F=B3=E4=BE=A7=E5=A2=9E=E5=8A=A0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A1=8C=E9=9D=A2=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 高效模式最右侧增加显示桌面区域 Log: 增加显示桌面按钮 Influence: 进入高效模式,鼠标进入最右侧,点击,观察是否可以正常显示桌面 Bug: https://pms.uniontech.com/bug-view-180859.html Change-Id: I1565d0ad5a47bb3f99c9d51c74c6df67f7f7892c --- frame/window/docktraywindow.cpp | 11 ++++++----- frame/window/docktraywindow.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frame/window/docktraywindow.cpp b/frame/window/docktraywindow.cpp index dcf030a0e..35a9942d7 100644 --- a/frame/window/docktraywindow.cpp +++ b/frame/window/docktraywindow.cpp @@ -29,6 +29,7 @@ #include "pluginsitem.h" #include "expandiconwidget.h" #include "quickdragcore.h" +#include "desktop_widget.h" #include @@ -45,7 +46,7 @@ DockTrayWindow::DockTrayWindow(DockInter *dockInter, QWidget *parent) , m_position(Dock::Position::Bottom) , m_displayMode(Dock::DisplayMode::Efficient) , m_mainBoxLayout(new QBoxLayout(QBoxLayout::Direction::RightToLeft, this)) - , m_frontWidget(new QWidget(this)) + , m_showDesktopWidget(new DesktopWidget(this)) , m_toolWidget(new QWidget(this)) , m_toolLayout(new QBoxLayout(QBoxLayout::RightToLeft, m_toolWidget)) , m_toolLineLabel(new QLabel(this)) @@ -280,7 +281,7 @@ void DockTrayWindow::updateToolWidget() { m_toolWidget->setVisible(m_toolLayout->count() > 0); m_toolLineLabel->setVisible(m_toolLayout->count() > 0); - m_frontWidget->setVisible(m_toolLayout->count() > 0); + m_showDesktopWidget->setVisible(m_toolLayout->count() > 0); } void DockTrayWindow::initUi() @@ -291,7 +292,7 @@ void DockTrayWindow::initUi() m_systemPuginWidget->setDisplayMode(Dock::DisplayMode::Efficient); m_mainBoxLayout->setContentsMargins(0, 0, 0, 0); m_mainBoxLayout->setSpacing(0); - m_mainBoxLayout->addWidget(m_frontWidget); + m_mainBoxLayout->addWidget(m_showDesktopWidget); m_mainBoxLayout->addWidget(m_toolWidget); m_mainBoxLayout->addSpacing(SPLITESPACE); m_mainBoxLayout->addWidget(m_toolLineLabel); @@ -363,7 +364,7 @@ void DockTrayWindow::onUpdateComponentSize() case Dock::Position::Left: case Dock::Position::Right: m_toolLineLabel->setFixedSize(width() * 0.6, SPLITERSIZE); - m_frontWidget->setFixedSize(QWIDGETSIZE_MAX, FRONTSPACING); + m_showDesktopWidget->setFixedSize(QWIDGETSIZE_MAX, FRONTSPACING); m_dateTimeWidget->setFixedSize(QWIDGETSIZE_MAX, m_dateTimeWidget->suitableSize().height()); m_systemPuginWidget->setFixedSize(QWIDGETSIZE_MAX, m_systemPuginWidget->suitableSize().height()); m_quickIconWidget->setFixedSize(QWIDGETSIZE_MAX, m_quickIconWidget->suitableSize().height()); @@ -372,7 +373,7 @@ void DockTrayWindow::onUpdateComponentSize() case Dock::Position::Top: case Dock::Position::Bottom: m_toolLineLabel->setFixedSize(SPLITERSIZE, height() * 0.6); - m_frontWidget->setFixedSize(FRONTSPACING, QWIDGETSIZE_MAX); + m_showDesktopWidget->setFixedSize(FRONTSPACING, QWIDGETSIZE_MAX); m_dateTimeWidget->setFixedSize(m_dateTimeWidget->suitableSize().width(), QWIDGETSIZE_MAX); m_systemPuginWidget->setFixedSize(m_systemPuginWidget->suitableSize().width(), QWIDGETSIZE_MAX); m_quickIconWidget->setFixedSize(m_quickIconWidget->suitableSize().width(), QWIDGETSIZE_MAX); diff --git a/frame/window/docktraywindow.h b/frame/window/docktraywindow.h index 981ea1a6c..84ff7dc6a 100644 --- a/frame/window/docktraywindow.h +++ b/frame/window/docktraywindow.h @@ -81,7 +81,7 @@ private: Dock::Position m_position; Dock::DisplayMode m_displayMode; QBoxLayout *m_mainBoxLayout; - QWidget *m_frontWidget; + QWidget *m_showDesktopWidget; QWidget *m_toolWidget; QBoxLayout *m_toolLayout; QLabel *m_toolLineLabel;