mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2026-06-18 19:35:47 +00:00
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.
59 lines
1.4 KiB
QML
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|