aerothemeplasma/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/Watermark.qml
wackyideas 8d6fbd7bdb overhaul: prepare repo for Plasma 6.6 release
This commit overhauls the repository structure such that it separates
the project into multiple repositories, one for each subproject. This
repository will be moved to the AeroShell group, and most importantly,
the installation method changes from locally installed modifications, to
CMake-based installation, in preparation for AUR packages, and possibly
packages for other distros.

Migration details are in INSTALL.md, which are highly recommended, if
not required to uninstall any old instance of AeroThemePlasma.
2026-02-21 21:15:07 +01:00

59 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Layouts
import org.kde.plasma.plasmoid
ColumnLayout {
spacing: 0
opacity: Plasmoid.configuration.watermarkVisible
z: -1
Item {
id: watermarkManager
property var watermarks
property int count: 0
function load() {
watermarks = JSON.parse(Plasmoid.configuration.watermarks);
count = watermarks.length;
}
Connections {
target: Plasmoid.configuration
function onWatermarksChanged() {
watermarkManager.load();
}
}
Component.onCompleted: load()
}
Repeater {
model: watermarkManager.count
delegate: Text {
id: delegate
required property int index
Layout.fillWidth: true
text: watermarkManager.watermarks[index].text
font.bold: watermarkManager.watermarks[index].bold
color: "#" + watermarkManager.watermarks[index].color
wrapMode: Text.WordWrap
horizontalAlignment: {
switch(watermarkManager.watermarks[index].horizontalAlignment) {
case 0:
return Text.AlignLeft;
case 1:
return Text.AlignHCenter;
case 2:
return Text.AlignRight;
}
}
}
}
}