mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
components: Add TextDropShadow
Introduce shadow component that uses MultiEffect from Qt 6.5
This commit is contained in:
parent
3f74522241
commit
12b9f1df9f
3 changed files with 16 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
14
components/mobileshell/qml/components/TextDropShadow.qml
Normal file
14
components/mobileshell/qml/components/TextDropShadow.qml
Normal 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
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue