mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
This merge request implements a more mobile optimized solution for popup notification. - The current controls are: - Swipe up to move the notification to the notification center. - Swipe left/right to dismiss the notification entirely. - If multiple popup notifications are grouped together, tap on the bottom area to view them in a expanded view. What still needs to be done: - ~~For notification without a default action, tapping on them should probably open up the associated app.~~ Note: I think I will add this in a separate merge request as it probably should be the case regardless if the notification is a popup - ~~Swiping down on a notification currently does nothing. Maybe we should map this to a notification action?~~ Note: I have some ideas I will try later, though for now, I will leave this action blank - ~~The expanded view of notifications should be able to be dismissed by swiping up/down on the top/bottom of the list.~~ Note: Added - Investigate further into how to remove the current desktop popup notifications. - ~~Code clean up.~~ Note: The code is at least a bit better Single popup notification:  Multiple popup notifications:  Multiple popup notifications in the expanded view:  Any feedback would be greatly appreciated.
59 lines
2.2 KiB
CMake
59 lines
2.2 KiB
CMake
# SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
ecm_add_qml_module(mobileshellplugin URI org.kde.plasma.private.mobileshell GENERATE_PLUGIN_SOURCE DEPENDENCIES QtQuick)
|
|
|
|
set(mobileshellplugin_SRCS
|
|
shellutil.cpp
|
|
components/direction.cpp
|
|
components/direction.h
|
|
components/swipearea.cpp
|
|
notifications/notificationthumbnailer.cpp
|
|
notifications/notificationfilemenu.cpp
|
|
notifications/notificationfileinfo.cpp
|
|
)
|
|
target_include_directories(mobileshellplugin PRIVATE components)
|
|
target_include_directories(mobileshellplugin PRIVATE notifications)
|
|
target_sources(mobileshellplugin PRIVATE ${mobileshellplugin_SRCS})
|
|
|
|
# Singleton declarations
|
|
set_source_files_properties(qml/components/AppLaunch.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/components/Constants.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/dataproviders/AudioInfo.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/dataproviders/BatteryInfo.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/dataproviders/BluetoothInfo.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/dataproviders/SignalStrengthInfo.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/notificationpopup/NotificationPopupProviderLoader.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
set_source_files_properties(qml/volumeosd/VolumeOSDProviderLoader.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
|
|
|
# Include qml and js files within ./qml/
|
|
file(GLOB_RECURSE _qml_sources
|
|
"qml/*.qml"
|
|
"qml/*.js"
|
|
)
|
|
ecm_target_qml_sources(mobileshellplugin SOURCES ${_qml_sources})
|
|
|
|
|
|
target_link_libraries(mobileshellplugin
|
|
PUBLIC
|
|
Qt::Core
|
|
PRIVATE
|
|
Qt::DBus
|
|
Qt::Qml
|
|
Qt::Gui
|
|
Qt::Quick
|
|
Qt::WaylandClientPrivate
|
|
KF6::KIOGui
|
|
Plasma::Plasma
|
|
KF6::I18n
|
|
KF6::Notifications
|
|
Plasma::PlasmaQuick
|
|
KF6::KIOGui
|
|
KF6::KIOWidgets # for PreviewJob
|
|
KF6::Service
|
|
KF6::Package
|
|
KF6::ConfigGui
|
|
LayerShellQt::Interface
|
|
)
|
|
|
|
ecm_finalize_qml_module(mobileshellplugin)
|