components: Add TextDropShadow

Introduce shadow component that uses MultiEffect from Qt 6.5
This commit is contained in:
Devin Lin 2023-05-12 19:43:24 -04:00
parent 3f74522241
commit 12b9f1df9f
3 changed files with 16 additions and 0 deletions

View file

@ -54,6 +54,7 @@ void MobileShellPlugin::registerTypes(const char *uri)
qmlRegisterType(resolvePath("components/ListView.qml"), uri, 1, 0, "ListView");
qmlRegisterType(resolvePath("components/PopupMenu.qml"), uri, 1, 0, "PopupMenu");
qmlRegisterType(resolvePath("components/StartupFeedback.qml"), uri, 1, 0, "StartupFeedback");
qmlRegisterType(resolvePath("components/TextDropShadow.qml"), uri, 1, 0, "TextDropShadow");
qmlRegisterType(resolvePath("components/VelocityCalculator.qml"), uri, 1, 0, "VelocityCalculator");
// /dataproviders

View file

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick.Effects
// Standard drop shadow for text in the shell.
// Use a drop shadow when text needs to be contrasted over a background.
MultiEffect {
shadowEnabled: true
shadowVerticalOffset: 1
blurMax: 8
shadowOpacity: 0.6
}

View file

@ -32,6 +32,7 @@
<file>qml/components/MarqueeLabel.qml</file>
<file>qml/components/PopupMenu.qml</file>
<file>qml/components/StartupFeedback.qml</file>
<file>qml/components/TextDropShadow.qml</file>
<file>qml/components/util.js</file>
<file>qml/components/VelocityCalculator.qml</file>