From b81dafbd4fca202cfd65a51cfd38293c8d014ddc Mon Sep 17 00:00:00 2001
From: maqi <maqi@uniontech.com>
Date: Mon, 13 May 2024 15:09:33 +0800
Subject: [PATCH] Solve the problem of not being able to shrink after
 magnification

---
 src/windowedframe.cpp | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/windowedframe.cpp b/src/windowedframe.cpp
index 55c34069..bf997690 100644
--- a/src/windowedframe.cpp
+++ b/src/windowedframe.cpp
@@ -87,18 +87,14 @@ WindowedFrame::WindowedFrame(QWidget *parent)
     , m_displayMode(All)
     , m_calcUtil(CalculateUtil::instance())
     , m_focusPos(Applist)
-    , m_modeToggleBtn(new ModeToggleButton(this))
     , m_searcherEdit(new DSearchEdit(this))
     , m_enterSearchEdit(false)
     , m_dockFrontInfc(new DBusDockInterface(this))
 {
-    if (!getDConfigValue("enableFullScreenMode", true).toBool())
-        m_modeToggleBtn->hide();
 
     m_searcherEdit->setAccessibleName("searcherEdit");
     m_maskBg->setAccessibleName("MaskBg");
     m_switchBtn->setAccessibleName("switchBtn");
-    m_modeToggleBtn->setAccessibleName("modeToggleBtn");
     m_tipsLabel->setAccessibleName("tipsLabel");
 
     setMaskColor(DBlurEffectWidget::AutoColor);
@@ -135,7 +131,6 @@ WindowedFrame::WindowedFrame(QWidget *parent)
     searchLayout->setContentsMargins(9, 0, DLauncher::MINI_FRAME_LAYOUT_SPACE2, 0);
     searchLayout->addWidget(m_searcherEdit);
     searchLayout->setSpacing(6);
-    searchLayout->addWidget(m_modeToggleBtn);
 
     QHBoxLayout *appsLayout = new QHBoxLayout;
     appsLayout->setContentsMargins(DLauncher::MINI_FRAME_LAYOUT_SPACE1, 0, 0, 0);
@@ -225,7 +220,6 @@ WindowedFrame::WindowedFrame(QWidget *parent)
     connect(m_delayHideTimer, &QTimer::timeout, this, &WindowedFrame::prepareHideLauncher, Qt::QueuedConnection);
 
     connect(m_appearanceInter, &Appearance::OpacityChanged, this, &WindowedFrame::onOpacityChanged);
-    connect(m_modeToggleBtn, &DToolButton::clicked, this, &WindowedFrame::onToggleFullScreen);
 
     QTimer::singleShot(1, this, &WindowedFrame::onWMCompositeChanged);
     onOpacityChanged(m_appearanceInter->opacity());
@@ -235,10 +229,6 @@ WindowedFrame::WindowedFrame(QWidget *parent)
     connect(this, &WindowedFrame::visibleChanged, this, &WindowedFrame::onHideMenu);
 
     // 状态切换
-    m_switchBtn->updateStatus(All);
-    m_modeToggleBtn->setIconSize(QSize(32,32));
-    m_modeToggleBtn->setFixedSize(40, 40);
-    m_modeToggleBtn->setFocusPolicy(Qt::NoFocus);
 
     // 重置控件样式
     resetWidgetStyle();
@@ -928,7 +918,6 @@ void WindowedFrame::onToggleFullScreen()
     if (delegate)
         delegate->setActived(false);
 
-    m_modeToggleBtn->setHovered(false);
 
     // 全屏状态标识
     m_calcUtil->setFullScreen(true);
-- 
2.39.3

