2025-06-25 23:22:58 +00:00
|
|
|
// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
|
|
#include <KConfigGroup>
|
|
|
|
|
|
2025-07-16 05:42:56 +00:00
|
|
|
#include <Plasma/Applet>
|
|
|
|
|
|
2025-07-15 02:05:18 +00:00
|
|
|
#include <qqmlregistration.h>
|
|
|
|
|
|
2025-06-25 23:22:58 +00:00
|
|
|
class HalcyonSettings : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2025-07-15 02:05:18 +00:00
|
|
|
QML_ELEMENT
|
|
|
|
|
QML_UNCREATABLE("")
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
Q_PROPERTY(HalcyonSettings::WallpaperBlurEffect wallpaperBlurEffect READ wallpaperBlurEffect WRITE setWallpaperBlurEffect NOTIFY wallpaperBlurEffectChanged)
|
2025-06-27 04:14:26 +00:00
|
|
|
Q_PROPERTY(bool doubleTapToLock READ doubleTapToLock WRITE setDoubleTapToLock NOTIFY doubleTapToLockChanged)
|
2025-06-25 23:22:58 +00:00
|
|
|
|
|
|
|
|
public:
|
2025-07-16 05:42:56 +00:00
|
|
|
HalcyonSettings(Plasma::Applet *applet = nullptr, QObject *parent = nullptr);
|
2025-06-25 23:22:58 +00:00
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
enum WallpaperBlurEffect {
|
|
|
|
|
None = 0,
|
|
|
|
|
Simple = 1,
|
|
|
|
|
Full = 2,
|
|
|
|
|
};
|
|
|
|
|
Q_ENUM(WallpaperBlurEffect)
|
|
|
|
|
|
2025-07-16 05:42:56 +00:00
|
|
|
QString pinned() const;
|
|
|
|
|
void setPinned(const QString &pinnedJson);
|
|
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
WallpaperBlurEffect wallpaperBlurEffect() const;
|
|
|
|
|
void setWallpaperBlurEffect(WallpaperBlurEffect wallpaperBlurEffect);
|
2025-06-25 23:22:58 +00:00
|
|
|
|
2025-06-27 04:14:26 +00:00
|
|
|
bool doubleTapToLock() const;
|
|
|
|
|
void setDoubleTapToLock(bool doubleTapToLock);
|
2025-06-25 23:22:58 +00:00
|
|
|
|
2025-07-16 05:42:56 +00:00
|
|
|
Q_INVOKABLE void load();
|
|
|
|
|
|
2025-06-25 23:22:58 +00:00
|
|
|
Q_SIGNALS:
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
void wallpaperBlurEffectChanged();
|
2025-06-27 04:14:26 +00:00
|
|
|
void doubleTapToLockChanged();
|
2025-06-25 23:22:58 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void save();
|
2025-07-16 05:42:56 +00:00
|
|
|
KConfigGroup configGroup() const;
|
|
|
|
|
|
|
|
|
|
void migrateConfigFromPlasma6_4();
|
2025-06-25 23:22:58 +00:00
|
|
|
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
WallpaperBlurEffect m_wallpaperBlurEffect{Full};
|
2025-06-27 04:14:26 +00:00
|
|
|
bool m_doubleTapToLock{true};
|
2025-06-25 23:22:58 +00:00
|
|
|
|
2025-07-16 05:42:56 +00:00
|
|
|
Plasma::Applet *m_applet;
|
Folio/Halcyon: Expand Background Blur Effect using a MaskLayer
This merge request expands upon the folio and halcyon background blur effects, making the folio background blur include the backgrounds of folder icons, the favorites bar, and wallpaper selector, and for halcyon, it now includes the folder icons, app library, search, and wallpaper selector. To accomplish this, a mask layer plugin was created to easily attach to these elements. This way, we can use a `OpacityMask` to cut out from the existing blur layer, thus hopefully keeping the performance cost low. And with my limited testing, it does at least seems to run about the same on my oneplus 6t, though it is not really a low end device, so I can not fairly judge the impact for something slower (eg. PinePhone). To be on the safe side, a third option was also added to the folio settings, allowing for the ability to toggle back to the old functionality if needed.




2025-06-27 18:27:30 +00:00
|
|
|
};
|