diff --git a/CMakeLists.txt b/CMakeLists.txt index 8403b6c87..6b12d2217 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +# SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. # # SPDX-License-Identifier: CC0-1.0 @@ -52,7 +52,7 @@ include(DDEShellPackageMacros) include(KDEClangFormat) include(KDEGitCommitHooks) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Concurrent Quick WaylandClient WaylandCompositor DBus LinguistTools Sql) +find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Concurrent Quick QuickTemplates2 WaylandClient WaylandCompositor DBus LinguistTools Sql) if(Qt${QT_VERSION_MAJOR}_VERSION VERSION_GREATER_EQUAL 6.10) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WaylandClientPrivate WaylandCompositorPrivate REQUIRED) endif() diff --git a/frame/CMakeLists.txt b/frame/CMakeLists.txt index 69ece6b19..195a1dc3e 100644 --- a/frame/CMakeLists.txt +++ b/frame/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +# SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. # # SPDX-License-Identifier: CC0-1.0 set(PUBLIC_HEADERS @@ -100,6 +100,7 @@ PUBLIC Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Quick PRIVATE + Qt${QT_VERSION_MAJOR}::QuickTemplates2Private Qt${QT_VERSION_MAJOR}::QuickPrivate Qt${QT_VERSION_MAJOR}::Concurrent Qt${QT_VERSION_MAJOR}::GuiPrivate diff --git a/frame/plugin/CMakeLists.txt b/frame/plugin/CMakeLists.txt index 9fa29ae35..e375966e3 100644 --- a/frame/plugin/CMakeLists.txt +++ b/frame/plugin/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +# SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. # # SPDX-License-Identifier: CC0-1.0 @@ -14,6 +14,7 @@ PUBLIC dde-shell-frame PRIVATE Qt${QT_VERSION_MAJOR}::QuickPrivate + Qt${QT_VERSION_MAJOR}::QuickTemplates2Private ) string(REPLACE "." "/" URI_PATH ${URI}) diff --git a/frame/popupwindow.cpp b/frame/popupwindow.cpp index 8d8c5844e..95e911efc 100644 --- a/frame/popupwindow.cpp +++ b/frame/popupwindow.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -6,7 +6,7 @@ DS_BEGIN_NAMESPACE PopupWindow::PopupWindow(QWindow *parent) - : QQuickWindowQmlImpl(parent) + : QQuickApplicationWindow(parent) { // minimum size is 1x1 to prevent protocols error on wayland setMinimumSize(QSize(1, 1)); @@ -26,7 +26,7 @@ PopupWindow::PopupWindow(QWindow *parent) void PopupWindow::mouseReleaseEvent(QMouseEvent *event) { - QQuickWindowQmlImpl::mouseReleaseEvent(event); + QQuickApplicationWindow::mouseReleaseEvent(event); auto rect = geometry(); if (!m_dragging && !rect.contains(event->globalPosition().toPoint()) && type() == Qt::Popup) { QMetaObject::invokeMethod(this, &QWindow::close, Qt::QueuedConnection); @@ -38,7 +38,7 @@ void PopupWindow::mouseReleaseEvent(QMouseEvent *event) void PopupWindow::mousePressEvent(QMouseEvent *event) { m_pressing = true; - return QQuickWindowQmlImpl::mousePressEvent(event); + return QQuickApplicationWindow::mousePressEvent(event); } void PopupWindow::mouseMoveEvent(QMouseEvent *event) @@ -46,7 +46,7 @@ void PopupWindow::mouseMoveEvent(QMouseEvent *event) if (m_pressing) { m_dragging = true; } - return QQuickWindowQmlImpl::mouseMoveEvent(event); + return QQuickApplicationWindow::mouseMoveEvent(event); } DS_END_NAMESPACE diff --git a/frame/popupwindow.h b/frame/popupwindow.h index d9eb1f451..cf68dbe9a 100644 --- a/frame/popupwindow.h +++ b/frame/popupwindow.h @@ -1,14 +1,14 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include "dsglobal.h" -#include +#include DS_BEGIN_NAMESPACE -class PopupWindow : public QQuickWindowQmlImpl +class PopupWindow : public QQuickApplicationWindow { Q_OBJECT Q_PROPERTY(QWindow *transientParent READ transientParent WRITE setTransientParent NOTIFY transientParentChanged) diff --git a/frame/qml/PanelPopupWindow.qml b/frame/qml/PanelPopupWindow.qml index 29c0f3795..b72ecb755 100644 --- a/frame/qml/PanelPopupWindow.qml +++ b/frame/qml/PanelPopupWindow.qml @@ -68,6 +68,7 @@ PopupWindow { width: 10 height: 10 flags: (Qt.platform.pluginName === "xcb" ? (Qt.Tool | Qt.WindowStaysOnTopHint) : Qt.Popup) + font: D.DTK.fontManager.t6 // WM_NAME, used for kwin. title: "dde-shell/panelpopup" D.DWindow.enabled: true @@ -152,4 +153,4 @@ PopupWindow { DStyle.Style.behindWindowBlur.darkNoBlurColor) } } -} +} \ No newline at end of file