From b27513dc6697f21115cfc9a28f862e89e624d087 Mon Sep 17 00:00:00 2001
From: samuel <53528911+samuel-jimenez@users.noreply.github.com>
Date: Fri, 8 Nov 2024 08:02:09 -0600
Subject: [PATCH] Rework config UI

---
 .gitignore                                    |   1 +
 package/README                                |   4 +-
 package/contents/config/config.qml            |  14 +-
 package/contents/config/main.xml              |  23 +-
 package/contents/ui/LunaIcon.qml              |  19 +-
 package/contents/ui/LunaWidget.qml            |  12 +
 package/contents/ui/configGeneral.qml         | 400 +++++++++---------
 package/contents/ui/configImage.qml           | 245 +++++++++++
 package/contents/ui/configPopup.qml           | 100 +++++
 package/contents/ui/main.qml                  |  14 +-
 ...ma_applet_org.kde.userbase.plasma.luna3.po | Bin 6498 -> 7276 bytes
 ...ma_applet_org.kde.userbase.plasma.luna3.po | Bin 6536 -> 7322 bytes
 ...ma_applet_org.kde.userbase.plasma.luna3.po | Bin 4716 -> 5528 bytes
 ...ma_applet_org.kde.userbase.plasma.luna3.po | Bin 4886 -> 5707 bytes
 ...a_applet_org.kde.userbase.plasma.luna3.pot | Bin 3977 -> 4662 bytes
 ...ma_applet_org.kde.userbase.plasma.luna3.po | Bin 5785 -> 6651 bytes
 src/shadow.frag                               |   7 +-
 17 files changed, 614 insertions(+), 225 deletions(-)
 create mode 100644 package/contents/ui/configImage.qml
 create mode 100644 package/contents/ui/configPopup.qml

diff --git a/.gitignore b/.gitignore
index 5719913..b12187f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.kateproject.build
 *.zip
 *.plasmoid
 /build/
diff --git a/package/README b/package/README
index a08f901..8e8459d 100644
--- a/package/README
+++ b/package/README
@@ -24,7 +24,7 @@ A. Command line, installs to ~/local/share/plasma/plasmoids
 
    Uninstall:  $ plasmapkg2 -r org.kde.userbase.plasma.Luna3
 
-   See README_TRANSLATIONS.txt (Step 4) for installing localisations.
+   See README_TRANSLATIONS.md (Step 4) for installing localizations.
 
 B. Command line, installs to /usr/local/share/plasma/plasmoids
 
@@ -34,7 +34,6 @@ B. Command line, installs to /usr/local/share/plasma/plasmoids
 
    Uninstall: # plasmapkg2 -g -r org.kde.userbase.plasma.Luna3
 
-   See README_TRANSLATIONS.txt (Step 4) for installing localisations.
 
 C. CMake, installs to /usr/local/share/plasma/plasmoids
 
@@ -46,7 +45,6 @@ C. CMake, installs to /usr/local/share/plasma/plasmoids
   3. Run: # cmake <path to source dir>
   4. Run: # make install
 
-  See README_TRANSLATIONS.txt (Step 4) for installing localisations.
 
 Custom Date Formats
 -------------------
diff --git a/package/contents/config/config.qml b/package/contents/config/config.qml
index 3010bcc..9f0727f 100644
--- a/package/contents/config/config.qml
+++ b/package/contents/config/config.qml
@@ -21,8 +21,20 @@ import org.kde.plasma.configuration
 ConfigModel {
     ConfigCategory {
         name: i18n("General")
-        icon: "preferences-desktop-user"
+        icon: "preferences-desktop-default-applications"
         source: "configGeneral.qml"
     }
 
+    ConfigCategory {
+        name: i18n("Custom Image")
+        icon: "preferences-desktop-color"
+        source: "configImage.qml"
+    }
+
+    ConfigCategory {
+        name: i18n("Date Popup")
+        icon: "preferences-system-time"
+        source: "configPopup.qml"
+    }
+
 }
diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml
index 028db03..483a32f 100644
--- a/package/contents/config/main.xml
+++ b/package/contents/config/main.xml
@@ -11,22 +11,43 @@
     <entry name="showBackground" type="Bool">
       <default>false</default>
     </entry>
+    <entry name="showGrid" type="Bool">
+      <default>false</default>
+    </entry>
+    <entry name="showTycho" type="Bool">
+      <default>false</default>
+    </entry>
+    <entry name="showCopernicus" type="Bool">
+      <default>false</default>
+    </entry>
     <entry name="showShadow" type="Bool">
       <default>true</default>
     </entry>
     <entry name="transparentShadow" type="Bool">
       <default>false</default>
     </entry>
+    <entry name="shadowOpacity" type="double">
+      <default>0.9</default>
+    </entry>
     <entry name="dateFormat" type="int">
       <default>3</default>
     </entry>
     <entry name="dateFormatString" type="String">
       <default>hh</default>
     </entry>
+    <entry name="currentPhase" type="int">
+      <default>0</default>
+    </entry>
+    <entry name="currentPhaseText" type="String">
+      <default>Processing</default>
+    </entry>
+    <entry name="currentPhaseSubText" type="String">
+      <default>PROCESSING</default>
+    </entry>
     <entry name="lunarIndex" type="int">
       <default>1</default>
     </entry>
-    <entry name="diskColor" type="String">
+    <entry name="diskColor" type="Color">
       <default>#ffff80</default>
     </entry>
   </group>
diff --git a/package/contents/ui/LunaIcon.qml b/package/contents/ui/LunaIcon.qml
index 90bdb7b..3332d07 100644
--- a/package/contents/ui/LunaIcon.qml
+++ b/package/contents/ui/LunaIcon.qml
@@ -34,6 +34,7 @@ Item {
     property int latitude: 90 //Degrees: 0=Equator, 90=North Pole, -90=South Pole
     property bool showShadow: true
     property bool transparentShadow: true
+    property real shadowOpacity: 0.9
     property string lunarImage: ''
     property color diskColor: '#ffffff'
     property int lunarImageTweak: 0
@@ -86,6 +87,7 @@ Item {
             visible: true
             anchors.centerIn: parent
             preferredRendererType: Shape.CurveRenderer
+            antialiasing: true
 
             ShapePath {
                 fillColor: diskColor
@@ -94,8 +96,8 @@ Item {
                 PathAngleArc {
                     centerX: radius
                     centerY: radius
-                    radiusY: radius
-                    radiusX: radius
+                    radiusY: radius - 1
+                    radiusX: radius - 1
                     startAngle: 0
                     sweepAngle: 360
                 }
@@ -212,8 +214,10 @@ Item {
                 if (showShadow) {
                     var cosTheta = Math.cos(theta / 180 * Math.PI);
                     var counterclockwisep = (theta < 180);
-                    context.globalAlpha = 0.9;
+                    var scaleTweak = 1.001 + 0.003 * (1 - Math.abs(cosTheta)); //Qt distorts Canvas with scale(), causing a line of pixels to appear around the shadow. Tweak the scale until this gets fixed.
+                    context.globalAlpha = 1;
                     context.translate(radius, radius);
+                    context.scale(scaleTweak, scaleTweak);
                     if (theta != 180) {
                         context.beginPath();
                         context.fillStyle = '#ffffff';
@@ -234,16 +238,18 @@ Item {
     }
 
     ShaderEffectSource {
+
         id: lunaMask
 
         anchors.centerIn: parent
         width: lunaBackground.width
         height: lunaBackground.height
         visible: false
-        antialiasing: false
+        antialiasing: true
 
         sourceItem: Shape {
             opacity: 1
+            antialiasing: true
             width: lunaBackground.width
             height: lunaBackground.height
             visible: true
@@ -257,8 +263,8 @@ Item {
                 PathAngleArc {
                     centerX: radius
                     centerY: radius
-                    radiusY: radius
-                    radiusX: radius
+                    radiusY: radius - 1
+                    radiusX: radius - 1
                     startAngle: 0
                     sweepAngle: 360
                 }
@@ -274,6 +280,7 @@ Item {
         property variant shadow: shadow
         property variant mask: lunaMask
         property int transparent: transparentShadow
+        property real shadow_Opacity: shadowOpacity
 
         opacity: 1
         rotation: latitude - 90
diff --git a/package/contents/ui/LunaWidget.qml b/package/contents/ui/LunaWidget.qml
index fc10ad8..3485c64 100644
--- a/package/contents/ui/LunaWidget.qml
+++ b/package/contents/ui/LunaWidget.qml
@@ -170,6 +170,10 @@ Item {
 
                 icon.source: "go-previous"
                 onClicked: showPreviousPhases()
+                QtControls.ToolTip.delay: 250
+                QtControls.ToolTip.timeout: 5000
+                QtControls.ToolTip.visible: hovered
+                QtControls.ToolTip.text: i18n("Previous Cycle")
             }
 
             PlasmaComponents.ToolButton {
@@ -177,6 +181,10 @@ Item {
 
                 icon.source: "go-jump-today"
                 onClicked: showTodayPhases()
+                QtControls.ToolTip.delay: 250
+                QtControls.ToolTip.timeout: 5000
+                QtControls.ToolTip.visible: hovered
+                QtControls.ToolTip.text: i18n("Today's Cycle")
             }
 
             PlasmaComponents.ToolButton {
@@ -184,6 +192,10 @@ Item {
 
                 icon.source: "go-next"
                 onClicked: showNextPhases()
+                QtControls.ToolTip.delay: 250
+                QtControls.ToolTip.timeout: 5000
+                QtControls.ToolTip.visible: hovered
+                QtControls.ToolTip.text: i18n("Next Cycle")
             }
 
         }
diff --git a/package/contents/ui/configGeneral.qml b/package/contents/ui/configGeneral.qml
index f2dca5c..ef3a418 100644
--- a/package/contents/ui/configGeneral.qml
+++ b/package/contents/ui/configGeneral.qml
@@ -23,8 +23,6 @@ import QtQuick
 import QtQuick.Controls as QtControls
 import QtQuick.Dialogs as QtDialogs
 import QtQuick.Layouts as QtLayouts
-import "code/lunacalc.js" as LunaCalc
-import "code/phases.js" as Phases
 import org.kde.kcmutils as KCM
 import org.kde.kirigami as Kirigami
 import org.kde.plasma.plasma5support as Plasma5Support
@@ -32,28 +30,28 @@ import org.kde.plasma.plasma5support as Plasma5Support
 KCM.SimpleKCM {
     id: generalPage
 
+    property int cfg_currentPhase: 0 // Degrees: 0= new moon, 90= first quarter, 180= full moon, 270= third quarter
     property alias previewPhase: phase.value
     property alias cfg_latitudeAuto: latitudeAuto.checked // 0=Equator, +90=North Pole, -90=South Pole
     property alias cfg_latitude: latitude.value // 0=Equator, +90=North Pole, -90=South Pole
     property alias cfg_transparentShadow: transparentShadow.checked // boolean
+    property alias cfg_shadowOpacity: shadowOpacity.value // real in [0,1]
     property alias cfg_showBackground: showBackground.checked // boolean
-    property alias cfg_dateFormat: dateFormat.currentIndex // code: 0= 1= 2=...
-    property alias cfg_dateFormatString: dateFormatString.text
-    property alias cfg_diskColor: diskColor.color
+    property alias cfg_diskColor: lunaPreview.diskColor
     property int cfg_lunarIndex: 0 // index into imageChoices
     property string cfg_lunarImage: '' // filename (from imageChoices)
     property int cfg_lunarImageTweak: 0 // rotation angle adjustment for the image (from imageChoices)
     property alias cfg_showShadow: showShadow.checked
-    property alias cfg_showGrid: showGrid.checked
-    property alias cfg_showTycho: showTycho.checked
-    property alias cfg_showCopernicus: showCopernicus.checked
+    property bool cfg_showGrid: false
+    property bool cfg_showTycho: false
+    property bool cfg_showCopernicus: false
 
     onCfg_lunarIndexChanged: {
         cfg_lunarImage = imageChoices.get(cfg_lunarIndex).filename;
         cfg_lunarImageTweak = imageChoices.get(cfg_lunarIndex).tweak;
     }
     Component.onCompleted: {
-        previewPhase = LunaCalc.getCurrentPhase(true).terminator;
+        previewPhase = cfg_currentPhase;
     }
 
     PositionSource {
@@ -64,7 +62,6 @@ KCM.SimpleKCM {
         updateInterval: 3600 * 1000
         active: cfg_latitudeAuto
         onPositionChanged: {
-            // lbl_place.text = i18n(geoSource.data.location.country);
             cfg_latitude = Math.round(geoSource.position.coordinate.latitude);
         }
     }
@@ -76,261 +73,248 @@ KCM.SimpleKCM {
     QtDialogs.ColorDialog {
         id: colorDialog
 
-        title: i18n("Pick a color for the moon")
+        options: QtDialogs.ColorDialog.ShowAlphaChannel
+        title: i18n("Moon color")
         visible: false
-        selectedColor: diskColor.color
-        onAccepted: diskColor.color = selectedColor
+        selectedColor: cfg_diskColor
+        onAccepted: cfg_diskColor = selectedColor
     }
 
-    QtLayouts.GridLayout {
-        columns: 2
-        rowSpacing: 15
+    QtLayouts.ColumnLayout {
+        spacing: 10
+        QtLayouts.Layout.fillWidth: true
 
-        QtControls.Label {
-            text: i18n("Preview")
-        }
-
-        QtLayouts.RowLayout {
-            spacing: 20
-
-            QtControls.Button {
-                id: previousButton
+        QtControls.Frame {
+            QtLayouts.Layout.fillWidth: true
+            QtLayouts.Layout.alignment: Qt.AlignTop
 
-                icon.source: "go-previous"
-                enabled: cfg_lunarIndex > 0
-                onClicked: {
-                    cfg_lunarIndex -= 1;
+            QtLayouts.GridLayout {
+                anchors.fill: parent
+                columns: 2
+                rowSpacing: 0
+                QtLayouts.Layout.alignment: Qt.AlignTop
+
+                QtControls.Label {
+                    text: i18n("Preview")
+                    font.bold: true
+                    QtLayouts.Layout.alignment: Qt.AlignTop
                 }
-            }
-
-            LunaIcon {
-                id: lunaPreview
-
-                width: 200
-                height: 200
-                latitude: cfg_latitude
-                theta: previewPhase
-                showShadow: cfg_showShadow
-                transparentShadow: false
-                lunarImage: cfg_lunarImage
-                lunarImageTweak: cfg_lunarImageTweak
-                diskColor: cfg_diskColor
-                showGrid: cfg_showGrid
-                showTycho: cfg_showTycho
-                showCopernicus: cfg_showCopernicus
-            }
 
-            QtControls.Button {
-                id: nextButton
+                QtLayouts.RowLayout {
+                    spacing: 20
+                    QtLayouts.Layout.alignment: Qt.AlignLeft
+
+                    QtControls.Button {
+                        id: previousButton
+
+                        QtControls.ToolTip.delay: 250
+                        QtControls.ToolTip.timeout: 5000
+                        QtControls.ToolTip.visible: hovered
+                        QtControls.ToolTip.text: i18n("Previous Image")
+                        icon.source: "go-previous"
+                        enabled: cfg_lunarIndex > 0
+                        onClicked: {
+                            cfg_lunarIndex -= 1;
+                        }
+                    }
+
+                    LunaIcon {
+                        id: lunaPreview
+
+                        width: 200
+                        height: 200
+                        latitude: cfg_latitude
+                        theta: previewPhase
+                        showShadow: cfg_showShadow
+                        transparentShadow: cfg_transparentShadow
+                        shadowOpacity: cfg_shadowOpacity
+                        lunarImage: cfg_lunarImage
+                        lunarImageTweak: cfg_lunarImageTweak
+                        diskColor: cfg_diskColor
+                        showGrid: cfg_showGrid
+                        showTycho: cfg_showTycho
+                        showCopernicus: cfg_showCopernicus
+
+                        MouseArea {
+                            anchors.fill: parent
+                            visible: cfg_lunarImage === ""
+                            QtControls.ToolTip.delay: 250
+                            QtControls.ToolTip.timeout: 5000
+                            QtControls.ToolTip.visible: visible && hovered
+                            QtControls.ToolTip.text: i18n("Pick Color")
+                            onClicked: {
+                                colorDialog.visible = true;
+                            }
+                        }
+
+                    }
+
+                    QtControls.Button {
+                        id: nextButton
+
+                        QtControls.ToolTip.delay: 250
+                        QtControls.ToolTip.timeout: 5000
+                        QtControls.ToolTip.visible: hovered
+                        QtControls.ToolTip.text: i18n("Next Image")
+                        icon.source: "go-next"
+                        enabled: cfg_lunarIndex < imageChoices.count - 1
+                        onClicked: {
+                            cfg_lunarIndex += 1;
+                        }
+                    }
+
+                    QtLayouts.ColumnLayout {
+                        spacing: 20
+
+                        QtControls.CheckBox {
+                            id: showShadow
+
+                            text: i18n("Show shadow")
+                        }
+
+                    }
 
-                icon.source: "go-next"
-                enabled: cfg_lunarIndex < imageChoices.count - 1
-                onClicked: {
-                    cfg_lunarIndex += 1;
                 }
-            }
 
-            QtLayouts.ColumnLayout {
-                spacing: 20
-
-                QtControls.CheckBox {
-                    id: showShadow
-
-                    text: i18n("Show shadow")
+                QtControls.Label {
+                    text: i18n("Phase Preview")
+                    QtLayouts.Layout.preferredWidth: 85
+                    horizontalAlignment: Text.AlignRight
                 }
 
-                QtControls.CheckBox {
-                    id: showGrid
+                QtLayouts.RowLayout {
+                    spacing: 20
 
-                    text: i18n("Show grid")
-                }
+                    QtControls.Label {
+                        id: lbl_phase
 
-                QtControls.CheckBox {
-                    id: showTycho
+                        text: phase.value + "º "
+                        QtLayouts.Layout.preferredWidth: 40
+                        horizontalAlignment: Text.AlignRight
+                    }
 
-                    text: i18n("Tycho")
-                }
+                    QtControls.Slider {
+                        id: phase
 
-                QtControls.CheckBox {
-                    id: showCopernicus
+                        QtLayouts.Layout.fillWidth: true
+                        from: 0
+                        to: 360
+                        stepSize: 1
+                    }
 
-                    text: i18n("Copernicus")
                 }
 
             }
 
         }
 
-        QtControls.Label {
-            text: i18n("Phase Preview")
-            QtLayouts.Layout.preferredWidth: 85
-            horizontalAlignment: Text.AlignRight
-        }
-
-        QtLayouts.RowLayout {
-            spacing: 20
+        QtLayouts.GridLayout {
+            columns: 2
+            rowSpacing: 10
+            QtLayouts.Layout.fillWidth: true
 
-            QtControls.Label {
-                id: lbl_phase
+            QtLayouts.ColumnLayout {
+                spacing: 10
 
-                text: Math.abs(phase.value) + "º "
-                QtLayouts.Layout.preferredWidth: 40
-                horizontalAlignment: Text.AlignRight
-            }
+                QtControls.Label {
+                    text: i18n("Shadow")
+                    horizontalAlignment: Text.AlignCenter
+                    font.bold: true
+                }
 
-            QtControls.Slider {
-                id: phase
+                QtControls.Label {
+                    text: i18n("Opacity")
+                    QtLayouts.Layout.preferredWidth: 85
+                    horizontalAlignment: Text.AlignRight
+                }
 
-                value: lunaPreview.theta
-                QtLayouts.Layout.fillWidth: true
-                from: 0
-                to: 360
-                stepSize: 1
             }
 
-        }
-
-        QtControls.Label {
-            text: i18n("Disk Color")
-            visible: cfg_lunarImage === ""
-        }
-
-        Rectangle {
-            id: diskColor
+            QtLayouts.ColumnLayout {
+                spacing: 5
+                QtLayouts.Layout.fillWidth: true
 
-            width: 50
-            height: 50
-            color: '#808040'
-            border.color: '#000000'
-            radius: height / 2
-            visible: cfg_lunarImage === ""
+                QtControls.CheckBox {
+                    id: transparentShadow
 
-            MouseArea {
-                anchors.fill: parent
-                onClicked: {
-                    colorDialog.selectedColor = diskColor.color;
-                    colorDialog.visible = true;
+                    text: i18n("Transparent")
                 }
-            }
 
-        }
+                QtLayouts.RowLayout {
+                    spacing: 20
 
-        QtControls.Label {
-            text: i18n("Latitude")
-        }
-
-        QtLayouts.RowLayout {
-            spacing: 20
-
-            QtControls.Label {
-                id: lbl_latitude
-
-                text: Math.abs(latitude.value) + "º " + (latitude.value < 0 ? "S" : "N")
-                QtLayouts.Layout.preferredWidth: 40
-                horizontalAlignment: Text.AlignRight
-            }
-
-            QtControls.Slider {
-                id: latitude
-
-                QtLayouts.Layout.fillWidth: true
-                from: -90
-                to: 90
-                stepSize: 5
-                enabled: !cfg_latitudeAuto
-            }
+                    QtControls.Label {
+                        id: lbl_shadowOpacity
 
-        }
+                        text: Math.round(shadowOpacity.value * 100) + "%"
+                        QtLayouts.Layout.preferredWidth: 40
+                        horizontalAlignment: Text.AlignRight
+                    }
 
-        QtControls.Label {
-        }
+                    QtControls.Slider {
+                        id: shadowOpacity
 
-        QtLayouts.RowLayout {
-            spacing: 20
+                        QtLayouts.Layout.fillWidth: true
+                        from: 0
+                        to: 1
+                        stepSize: 0.05
+                    }
 
-            QtControls.CheckBox {
-                id: latitudeAuto
+                }
 
-                text: i18n("Use current latitude")
             }
 
             QtControls.Label {
-                id: lbl_place
-
-                QtLayouts.Layout.fillWidth: true
-                horizontalAlignment: Text.AlignRight
+                text: i18n("Latitude")
+                font.bold: true
+                lineHeight: 3
             }
 
-        }
+            QtLayouts.ColumnLayout {
+                spacing: 5
 
-        QtControls.Label {
-            text: i18n("Date Format")
-        }
+                QtLayouts.RowLayout {
+                    spacing: 20
 
-        QtControls.ComboBox {
-            id: dateFormat
+                    QtControls.Label {
+                        id: lbl_latitude
 
-            QtLayouts.Layout.fillWidth: true
-            textRole: "key"
-
-            model: ListModel {
-                dynamicRoles: true
-                Component.onCompleted: {
-                    append({
-                        "key": i18n("Text date"),
-                        "value": 0
-                    });
-                    append({
-                        "key": i18n("Short date"),
-                        "value": 1
-                    });
-                    append({
-                        "key": i18n("Long date"),
-                        "value": 2
-                    });
-                    append({
-                        "key": i18n("ISO date"),
-                        "value": 3
-                    });
-                    append({
-                        "key": i18n("Custom"),
-                        "value": 4
-                    });
-                }
-            }
+                        text: Math.abs(latitude.value) + "º " + (latitude.value < 0 ? "S" : "N")
+                        QtLayouts.Layout.preferredWidth: 40
+                        horizontalAlignment: Text.AlignRight
+                    }
 
-        }
+                    QtControls.Slider {
+                        id: latitude
 
-        QtControls.Label {
-            text: i18n("Date Format String")
-            visible: dateFormat.currentIndex == 4
-        }
+                        QtLayouts.Layout.fillWidth: true
+                        from: -90
+                        to: 90
+                        stepSize: 5
+                        onMoved: cfg_latitudeAuto = false
+                    }
 
-        QtControls.TextField {
-            id: dateFormatString
+                }
 
-            maximumLength: 24
-            visible: dateFormat.currentIndex == 4
-        }
+                QtControls.CheckBox {
+                    id: latitudeAuto
 
-        QtControls.Label {
-            text: i18n("Background")
-        }
+                    text: i18n("Use current latitude")
+                }
 
-        QtControls.CheckBox {
-            id: showBackground
+            }
 
-            text: i18n("Show background")
-        }
+            QtControls.Label {
+                text: i18n("Background")
+                font.bold: true
+            }
 
-        QtControls.Label {
-            text: ""
-        }
+            QtControls.CheckBox {
+                id: showBackground
 
-        QtControls.CheckBox {
-            id: transparentShadow
+                text: i18n("Show background")
+            }
 
-            text: i18n("Transparent shadow")
         }
 
     }
diff --git a/package/contents/ui/configImage.qml b/package/contents/ui/configImage.qml
new file mode 100644
index 0000000..d93fc34
--- /dev/null
+++ b/package/contents/ui/configImage.qml
@@ -0,0 +1,245 @@
+/**
+    Copyright (C) 2024 Samuel Jimenez <therealsamueljimenez@gmail.com>
+          Ported the Luna Plasmoid to Plasma 6.
+
+    Copyright 2016 Bill Binder <dxtwjb@gmail.com>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+import QtPositioning
+import QtQuick
+import QtQuick.Controls as QtControls
+import QtQuick.Dialogs as QtDialogs
+import QtQuick.Layouts as QtLayouts
+import org.kde.kcmutils as KCM
+import org.kde.kirigami as Kirigami
+import org.kde.plasma.plasma5support as Plasma5Support
+
+KCM.SimpleKCM {
+    id: generalPage
+
+    property int cfg_currentPhase: 0 // Degrees: 0= new moon, 90= first quarter, 180= full moon, 270= third quarter
+    property alias cfg_latitudeAuto: latitudeAuto.checked // 0=Equator, +90=North Pole, -90=South Pole
+    property alias cfg_latitude: latitude.value // 0=Equator, +90=North Pole, -90=South Pole
+    property bool cfg_transparentShadow: true // boolean
+    property real cfg_shadowOpacity: 0.9 // real in [0,1]
+    property alias cfg_diskColor: lunaPreview.diskColor
+    property int cfg_lunarIndex: 0 // index into imageChoices
+    property string cfg_lunarImage: '' // filename (from imageChoices)
+    property int cfg_lunarImageTweak: 0 // rotation angle adjustment for the image (from imageChoices)
+    property alias cfg_showShadow: showShadow.checked
+    property alias cfg_showGrid: showGrid.checked
+    property alias cfg_showTycho: showTycho.checked
+    property alias cfg_showCopernicus: showCopernicus.checked
+
+    onCfg_lunarIndexChanged: {
+        cfg_lunarImage = imageChoices.get(cfg_lunarIndex).filename;
+        cfg_lunarImageTweak = imageChoices.get(cfg_lunarIndex).tweak;
+    }
+
+    PositionSource {
+        id: geoSource
+
+        readonly property bool locating: geoSource.active && geoSource.sourceError == PositionSource.NoError && !(geoSource.position.latitudeValid)
+
+        updateInterval: 3600 * 1000
+        active: cfg_latitudeAuto
+        onPositionChanged: {
+            cfg_latitude = Math.round(geoSource.position.coordinate.latitude);
+        }
+    }
+
+    ImageChoices {
+        id: imageChoices
+    }
+
+    QtDialogs.ColorDialog {
+        id: colorDialog
+
+        options: QtDialogs.ColorDialog.ShowAlphaChannel
+        title: i18n("Moon color")
+        visible: false
+        selectedColor: cfg_diskColor
+        onAccepted: cfg_diskColor = selectedColor
+    }
+
+    QtLayouts.ColumnLayout {
+        spacing: 5
+        QtLayouts.Layout.fillWidth: true
+
+        QtControls.Frame {
+            QtLayouts.Layout.fillWidth: true
+            QtLayouts.Layout.alignment: Qt.AlignTop
+
+            QtLayouts.GridLayout {
+                anchors.fill: parent
+                columns: 2
+                rowSpacing: 0
+                QtLayouts.Layout.alignment: Qt.AlignTop
+
+                QtControls.Label {
+                    text: i18n("Preview")
+                    font.bold: true
+                    QtLayouts.Layout.alignment: Qt.AlignTop
+                }
+
+                QtLayouts.RowLayout {
+                    spacing: 20
+                    QtLayouts.Layout.alignment: Qt.AlignLeft
+
+                    QtControls.Button {
+                        id: previousButton
+
+                        QtControls.ToolTip.delay: 250
+                        QtControls.ToolTip.timeout: 5000
+                        QtControls.ToolTip.visible: hovered
+                        QtControls.ToolTip.text: i18n("Previous Image")
+                        icon.source: "go-previous"
+                        enabled: cfg_lunarIndex > 0
+                        onClicked: {
+                            cfg_lunarIndex -= 1;
+                        }
+                    }
+
+                    LunaIcon {
+                        id: lunaPreview
+
+                        width: 200
+                        height: 200
+                        latitude: cfg_latitude
+                        theta: cfg_currentPhase
+                        showShadow: cfg_showShadow
+                        transparentShadow: cfg_transparentShadow
+                        shadowOpacity: cfg_shadowOpacity
+                        lunarImage: cfg_lunarImage
+                        lunarImageTweak: cfg_lunarImageTweak
+                        diskColor: cfg_diskColor
+                        showGrid: cfg_showGrid
+                        showTycho: cfg_showTycho
+                        showCopernicus: cfg_showCopernicus
+
+                        MouseArea {
+                            anchors.fill: parent
+                            visible: cfg_lunarImage === ""
+                            QtControls.ToolTip.delay: 250
+                            QtControls.ToolTip.timeout: 5000
+                            QtControls.ToolTip.visible: visible && hovered
+                            QtControls.ToolTip.text: i18n("Pick Color")
+                            onClicked: {
+                                colorDialog.visible = true;
+                            }
+                        }
+
+                    }
+
+                    QtControls.Button {
+                        id: nextButton
+
+                        QtControls.ToolTip.delay: 250
+                        QtControls.ToolTip.timeout: 5000
+                        QtControls.ToolTip.visible: hovered
+                        QtControls.ToolTip.text: i18n("Next Image")
+                        icon.source: "go-next"
+                        enabled: cfg_lunarIndex < imageChoices.count - 1
+                        onClicked: {
+                            cfg_lunarIndex += 1;
+                        }
+                    }
+
+                    QtLayouts.ColumnLayout {
+                        spacing: 20
+
+                        QtControls.CheckBox {
+                            id: showShadow
+
+                            text: i18n("Show shadow")
+                        }
+
+                        QtControls.CheckBox {
+                            id: showGrid
+
+                            text: i18n("Show grid")
+                        }
+
+                        QtControls.CheckBox {
+                            id: showTycho
+
+                            text: i18n("Tycho")
+                        }
+
+                        QtControls.CheckBox {
+                            id: showCopernicus
+
+                            text: i18n("Copernicus")
+                        }
+
+                    }
+
+                }
+
+            }
+
+        }
+
+        QtLayouts.GridLayout {
+            columns: 2
+            rowSpacing: 15
+            QtLayouts.Layout.fillWidth: true
+
+            QtControls.Label {
+                text: i18n("Latitude")
+                font.bold: true
+                lineHeight: 3
+            }
+
+            QtLayouts.ColumnLayout {
+                spacing: 5
+
+                QtLayouts.RowLayout {
+                    spacing: 20
+
+                    QtControls.Label {
+                        id: lbl_latitude
+
+                        text: Math.abs(latitude.value) + "º " + (latitude.value < 0 ? "S" : "N")
+                        QtLayouts.Layout.preferredWidth: 40
+                        horizontalAlignment: Text.AlignRight
+                    }
+
+                    QtControls.Slider {
+                        id: latitude
+
+                        QtLayouts.Layout.fillWidth: true
+                        from: -90
+                        to: 90
+                        stepSize: 5
+                        onMoved: cfg_latitudeAuto = false
+                    }
+
+                }
+
+                QtControls.CheckBox {
+                    id: latitudeAuto
+
+                    text: i18n("Use current latitude")
+                }
+
+            }
+
+        }
+
+    }
+
+}
diff --git a/package/contents/ui/configPopup.qml b/package/contents/ui/configPopup.qml
new file mode 100644
index 0000000..e0c0864
--- /dev/null
+++ b/package/contents/ui/configPopup.qml
@@ -0,0 +1,100 @@
+/**
+    Copyright (C) 2024 Samuel Jimenez <therealsamueljimenez@gmail.com>
+          Ported the Luna Plasmoid to Plasma 6.
+
+    Copyright 2016 Bill Binder <dxtwjb@gmail.com>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+import QtPositioning
+import QtQuick
+import QtQuick.Controls as QtControls
+import QtQuick.Dialogs as QtDialogs
+import QtQuick.Layouts as QtLayouts
+import org.kde.kcmutils as KCM
+import org.kde.kirigami as Kirigami
+import org.kde.plasma.plasma5support as Plasma5Support
+
+KCM.SimpleKCM {
+    id: generalPage
+
+    property alias cfg_dateFormat: dateFormat.currentIndex // code: 0= 1= 2=...
+    property alias cfg_dateFormatString: dateFormatString.text
+
+    QtLayouts.ColumnLayout {
+        spacing: 5
+        QtLayouts.Layout.fillWidth: true
+
+        QtLayouts.GridLayout {
+            columns: 2
+            rowSpacing: 15
+            QtLayouts.Layout.fillWidth: true
+
+            QtControls.Label {
+                text: i18n("Date Format")
+                font.bold: true
+            }
+
+            QtControls.ComboBox {
+                id: dateFormat
+
+                QtLayouts.Layout.fillWidth: true
+                textRole: "key"
+
+                model: ListModel {
+                    dynamicRoles: true
+                    Component.onCompleted: {
+                        append({
+                            "key": i18n("Text date"),
+                            "value": 0
+                        });
+                        append({
+                            "key": i18n("Short date"),
+                            "value": 1
+                        });
+                        append({
+                            "key": i18n("Long date"),
+                            "value": 2
+                        });
+                        append({
+                            "key": i18n("ISO date"),
+                            "value": 3
+                        });
+                        append({
+                            "key": i18n("Custom"),
+                            "value": 4
+                        });
+                    }
+                }
+
+            }
+
+            QtControls.Label {
+                text: i18n("Date Format String")
+                visible: dateFormat.currentIndex == 4
+            }
+
+            QtControls.TextField {
+                id: dateFormatString
+
+                maximumLength: 24
+                visible: dateFormat.currentIndex == 4
+            }
+
+        }
+
+    }
+
+}
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index 4402909..060d744 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -40,9 +40,17 @@ PlasmoidItem {
     property int maximumHeight
     property int preferredWidth
     property int preferredHeight
-    property var currentPhase
+    property var currentPhase: {
+        terminator:
+        plasmoid.configuration.currentPhase;
+        text:
+        plasmoid.configuration.currentPhaseText;
+        subText:
+        plasmoid.configuration.currentPhaseSubText;
+    }
     property bool showBackground: plasmoid.configuration.showBackground
     property bool transparentShadow: plasmoid.configuration.transparentShadow
+    property real shadowOpacity: plasmoid.configuration.shadowOpacity
     property int latitude: plasmoid.configuration.latitude
     property int dateFormat: plasmoid.configuration.dateFormat
     property string dateFormatString: plasmoid.configuration.dateFormatString
@@ -67,6 +75,7 @@ PlasmoidItem {
         function updateDetails() {
             // set the correct image for the moon
             currentPhase = LunaCalc.getCurrentPhase(true);
+            plasmoid.configuration.currentPhase = currentPhase.terminator;
             lunaIcon.phaseNumber = 13; //currentPhase.number;
             lunaIcon.theta = currentPhase.terminator;
             lunaIcon.latitude = latitude;
@@ -98,12 +107,13 @@ PlasmoidItem {
             lunarImage: main.lunarImage
             lunarImageTweak: main.lunarImageTweak
             transparentShadow: main.transparentShadow
+            shadowOpacity: main.shadowOpacity
             diskColor: main.diskColor
             anchors.fill: parent
 
             MouseArea {
                 anchors.fill: parent
-                onClicked: plasmoid.expanded = !plasmoid.expanded
+                onClicked: expanded = !expanded
             }
 
         }
diff --git a/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/es/plasma_applet_org.kde.userbase.plasma.luna3.po
index 4e21b1542714eb52c5d72d14f24c5efb25b24f04..ac15503389271703f03c3e587a5bf5a6eacaa232 100644
GIT binary patch
delta 837
zcmaE4^u}VtcSa5)Lj?m%D+9C5{~5P1PA*^;mb2ti)=@|+t*WZz$}LXMOi@sBE-fy}
z&sFfuO-xUn%qE~Zxqw+n#Ml%j?UGoMst}N0P+BnAmq%`L0IR^}6U>!tjOLRSxrF7w
zy7UTjbF9pbU^;yB^Yavv^K<fxCj0W}F<DxGRPrEHS{hH@!{x<fXbck9Lx>w1SYS9V
zpeVI0GrzPL;yfj;$<-nXlb>=aGMSiwbR(H+Xgt}GOMG$@uM@MODcDLUB%@7@F^u+0
zttf#Rn_HY-TvDW<<fEPm3I>JZ(#*2Nypq((54lvC%#A=+@gkXKW<HsNJ4({R0K?FL
zjKtzpg~>;_9GQ)b3?|p{gfbbKO}@%w$7EtKS(G=9$qei?B*Tmhj3yuFbz?F>x5dcV
zY%)Jz9Fu{?<TV0rOopbDzX&)?Uck+Uq}kBicybE26N-rC<gMKL$RZY|lRtCY@qptH
z991S}lk@pp#SsE#2C%pbNv)VH&o4Il37-Oz1~Ze%!u<Bg0v3}K`H_t@H=4YT-x^7U
zx!L3&{5D7e7N(P(1wtm@78Ka*B3Q>bxk^w*+1v~>0AUgCT$!Ac3XSlyf^uRO=5ROW
zrzBRY7b}2NO!ncC1(_*piJ5l55e!n4I(eSZo5>+uQq0PA3X}7=bR_B&po!llvp8G9
Y8I)F)xImJfywa053vb<gL!^rZ06wV%qyPW_

delta 415
zcmaE3@yKYycSa5aO9ev<D?@|L{~5P1PJX~Dx;d7ml8xJvOIb%Dt+cADl56rxF{R1p
z#B?Ta<x=3XG~miDPR~qHP@24v*OA%K)L^n5ZxoZM+2niyr^)=hyi8_BllKYeLzotm
ze+k%4=I7<(GlOXh$Ve<sovhCyH+cfL0JD*S`Q)#>p-hG*lYRK?n2gLP_wdE>nwr8?
zyJQwmj^=S;HnK37%){>nQdhzs$7EzM*+tNGGCwa5v$3(s<f(#=AU40Tu?0+Ha7KR7
z<OPCalUamhL2}H-CPtHWg+PwsVKz1~n_Mnr4G}jrn7mKO2FkXa%qAQ%`2nvGv$471
z<SYDcOy(AoWds~1uMrm5oF!bxIQgaM300666atD;%Q92TmAI7a6mpBxi%W_Wl)^HL
zOA-|dKr)GwHN|%dgB9hM7As`tCZ?x?)lOCyRgeH{0fnMpYDEdM<b58Q%{Rp-vj70p
C|9Msb

diff --git a/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/fr/plasma_applet_org.kde.userbase.plasma.luna3.po
index c47b2f4b5ca5918893c121c196c7b2fde3e4a9ea..c92551acd9be7d5e1e5c04c9a70ec6994f212491 100644
GIT binary patch
delta 929
zcmeA$o@Ke=0waf!p@M;>m4Vsj8;sSAllhp1<t(|BbrjM{tEwuwa*NY5Qxue(ON&eL
za}_*u6Vp>CU*}hw%*QMwVr&YNc1bKrRS3v0C@q+5$0IlS0IR^}4CbY5M&=61`FSO&
zc_qdArJ4H4`FUxX>0mST3UhO;%#C3Bee?746q56E@{1<h@#ra9THw`ZX*{``E5O;%
z7_TZr0}Bjq1Qex~W#*R_Lp-9yHF=?k!elpgfyr__f{G?4_{}q(%*!P{IgQuV!O#@H
z0}V}$F|77Wttf$8ds9RPYORo>5q?|E%qQRF%9OM)z%Vf&Be6JDVe(`ycV;6agUR_k
zDNIIYldtmFF_{=l7UgwPGQ;mmBLkz!>v-*z4Dh?a$k=T1dtPrQ1B=OZ0`W|Srjzdr
zcuYRP!^Vq<Nkenv$sXK+C?b}VS8(eii&&UWe#ULX15PI3_%|_|Y{Tb@Bw%JRc><p!
zvVh6t2YmL(0v40?`0bDc%#9{j^CPP;H=BHt-xf)Qh3RBbfso17LIRu31^XE%OA5&-
zo10;VCM;<<S0?AA!jlFcNTZmAIV`1y<fkN7suwGOR86+!kp)T1T4JU&aCCzdrB439
zEIxUw(9_8ZTvE)+bqbTMxb!9J6rdT)C9^nN!5NhDmAF8Xxx8|dPYNI1{7<Bd1pv?N
BEm8mg

delta 407
zcmbPb*<rll0wafkrGlY_m7&4r8;sSAlNGo`H~(W^%EoQUrL3cnR$5h6$u;?)n9}5D
zV)~Oqc@&r|4JNB_2QZl$OcvqIWHL3I93l`nxqz3K-^_?Bw>UjBML{W~GC3oE@&#tO
z$!B>5m<`P=CchJ~0jn`LgQ*F~NGwi;su5%|FrWN@H-*X2WU?Ed9g~sy<TgGhUQ<(;
zVwcR~$$C8Q%tjUllV9=KgVcHRdovjsOg0mAom{}n!)$D9GPzyQ5z4lhd_~Y6!ZtCQ
zEH7jSWt&aT6oQJI8cg0IWD5~DwVeD{C}i>kE+J-PbHm9q_~V((Ehhiu_n5puRA6(W
za6jYZucB83K`vGZC`v8MOf6U9Qm#{&JfBx?vbXqAVX$C+X|Y0PZen^WL{48+LBCD`
m8X|tF6(vZLxy9+lB}EEKKI&i%3dN<FWr=wuo0%kLumAw>vwJQ8

diff --git a/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/hr/plasma_applet_org.kde.userbase.plasma.luna3.po
index 731fd2605be06a3abaf2e92fe17580b8ca8acb2e..c7b267253b2f7aae0b1c827be1887e47c3a81eb2 100644
GIT binary patch
delta 801
zcmaE(GDCZV2P21(p@M;>m4Vsj0LBc)$)!xfa+X}mItpo}RaKQ-xy9+3DGEx?rNt%r
zxeA`SiRr16Kkz9`E@cuDF*b!syCjyRDg@*glom`j;Fg<gz$~!&EK?dAqxs}UPGLE)
zF1^Cs94m7pm=53k{5*x^{G9xv$p+kdOqLcPl{^TQmd2A8ak?@Y8iT}@5aNag7BC|M
zic-rm^Gl1tu9~dRt<P*|VggdGh@{*Y(=P#;$&+Jv?3oQs!Io+usWvsn@VQ@VMG4r3
z)X4>cvXjgC<d_Z3jX>5Qxz^BZass!=<UgFQk`@LSMg(Le7N;sqUd3s{Y-D6GIgvY<
z$;fQ-Hf}p66NAa$xFea&zz*R>IK;@nX!1NBe<lO4MaUAyW|QCZ<S-dnOzz<KWHL0J
ze3{>AvH~X?k{UyE<H^ok4k#j)lP7VRB8ym<PQJ!v#{-TtaMYNXO^)StK@u=Cn7n}(
zS%sO&<iETQ$SN!*`|#N!378vAp2260EMPYI5uZ7dfQ9K~4Sw&*2?7F}RRuB_CodI{
z5jQu(h*9Ut<ebU++_E5rVix8w`H=jS#7gyI1!QSiOACwu2geym5h%`XO?KmyVpgtG
rn4G|=pi`#+P0=oy#n}qZpaiJIr3@A=E-6w_a>~z2Q~=2(Dsce-glhL3

delta 311
zcmbQC{YGVj2P21prGlY_m7&4r0LBc)$qzV0H^(xku}v1_7N2Y^DmK|iRAKTpHi5|>
zxLGFGaPcr%8ccTKa%D0#n9Rr%!DMPS*@53-at#+RlbO-vUVc*u(_->@emfA8&)keF
zw>UjBML{VbBe8h$0WN)JBLnlv8+n463{57p@!ByNnNN1(jpQ{og(-B&ES{{!ZO?3E
zVKDh1uRlng5nm3Ik-=n10hh^l_;{I&O(tgw*g=>UlQ#=EfSD#nlm83YLYQWgJp`@6
zOjCo&{etEYrsd>Ig5Hxia0)RSn;TAEz~{+iZZY{apVMYpp$f*yMIw8ZG7^hZ6#|M<
e%Q92TmAI7a6mpBxi%W_Wlmd!U({oZ&l(+yf=vsUL

diff --git a/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/nl/plasma_applet_org.kde.userbase.plasma.luna3.po
index 7c9ed5f73f9e9cf07b4b2522f3d187a10a293eae..e80bdc16196d6a2759395b8511dc5e2c52906684 100644
GIT binary patch
delta 819
zcmbQHc3NkH6C;O_p@M;>m4Vr2FUCELlMgWo%UN<M>nNm^R#jDU<rb%BrYI;mmll`g
z=PG#SCZ?xOuH{#ne27U%#Ml%j?UGoMst}N0P+BlKfJbg}1GB(pY3Ai@jOLRQ`Gn=b
zy7UTjbF9pbU^;yB^Yavv^K<fxCI|57F<DxGRPrEHS{hH*=W=H<GzN()Bg732EMP_i
z6s4AB=9d;jT@}Ei$82a~0#dJtq}~|QGXa^&li%_<FdLeJZPh?hZEB3+b-&b#5~vmI
zLJE^_2=Yu8;1^;xG&cfS#fzlb%zSbMSGc5w0frd?8HvTI3X{#b?3j&=3?{$j4q`Gg
zo9xJA$7EtKxsfNH$qeigB*Tmhj3yiKdNUcI+hSyFHo2BJlN%8ZPLuNm<R)7Qs4^Lv
zPEHhXnJmE1hGdeVx$)$ST=pm;mXqbVO^`(_OeZIC+wp*-5FAq`W|Lp=Iv@#{8B8|k
zvqcs#ncU3hge+h&`3j1FxzS`*erqHZ=4O-g`7MzIEKDbF=Xam%CMd9Zt3VOs<QsxA
z66R(Y5$s%<oRc~^fJX+TQryBErXVCgC9zVySOG;|*3tqa{K0VuQN=Fwdh%6HDQ4w5
ug~{(Z<#g*5ph?^%vp8G98I&TGxRk-7#U(`wO2Nq)nOSMsIjN;ZN?ZVEa{9>t

delta 311
zcmX@DGfi!S6C;O#rGlY_m7&3AFUCELlh{NzuVr4&#%;-^tfP=tT2)oaHTkxv(j+mt
z$v3$bm@Ew@U*&RVGBubygD0HH)NJx?e*4M%+`LR?Mw8VAOdw2)$r%E6ASS=L8CPy`
zdS;4(Qb0yxaq8rHX1U4tcm$Y@49q8c@&+*(noOR{YsX|{KKU+hJg=!KOtnj9@#LM{
z4$MXt29x9Xyg}+t^JOv_8BE?J;4qn=n}^xh*ktlQ0b3~BVzRrS6NGJIG<hnVZ8rI_
zpfyC?)L^ofkR_CDIXPd*eR2V}5VNtl;bb#@A0~5)$u0aYlTV8XY(6Gb#5h?(^t2$z
W$qE5Qsb!g|<w{)2bqbROd4&O_3srOg

diff --git a/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot b/package/po/plasma_applet_org.kde.userbase.plasma.luna3.pot
index d8e1e18b6519ae3ccaed62ea443982a965544ca2..61e692e124bc444c82dff958ab21e3c5ea664f3a 100644
GIT binary patch
delta 708
zcmeB_-=?x5laa&7P{F{`%D`-MA)^oD<VGf8QA@7e;`GcE1tsUw;*$Ja1<%~X^wh}{
zStZqy^YhX&)Ab>gUSV#Im9Z&Iu}fk}szN}1L21F{iL82?FEN?0GMZ05$R#WV)(=)~
zZUj^9o1dSjkUV)Eml2bt1xOVSLY1ZQ<OmKsCPQP8xH3ZA(7*zwJ)kJHEHl5f816Q?
z$rrc;m<>%#KzbyQ^ccf^6Ofrac{P_Qv!N;2LU|-brp7RX{ZcDR&<!;=0vXDSq~6SY
z@(d0q0Sg0|wt$Sp;#7sn2^^-(Mn(pc?{eBQ8JSI%;j&{gF_;{~<-}wLwiC$=BLkz!
zkGbrb4A2cXGB%s6!tKpuU@_U9*OAH4baEH3@#F>EY)G07&5bAD;V?!Kv79W&sgEpT
zVLCa6(}V{cCE(CEF`Hb-ZHgpdW-xgxw=uGS$>i_c$Xd)SCR_0!t1vg3T*G68q{ZB9
z@?IVTBmoQ4$%Wj)llgg-Cp+*7Y(C4Y#W?u`uZ)Db89cCHk>^~QoRd0vA+L_Og*i+z
dBtIpwQoUFKE+=9Mk9Bb5KqL(LB`5KB0sxrs+{OR^

delta 360
zcmdm{(kZ_olaa%~Qo+!|%FtkQA)^oD<N^-X$pI_^n}e85SmiCba*NY5Qxuc}GLy3v
z5*3p3bMlK6((;QGN-|Ovawq$<DNa`4Vwt>vhlk11U@|+W9h0fS<SATEOr~a&EqIMV
z63m8XMw2Ue^`UHw$y<0$Kx}?Pb2GT{8HvS{1$gwCjSS2u%W>N>8JbLv<+fuoGM_w`
z+ez5e6sFK6vp8G9IX@?VvLLHG%xY#M3xmmwJoX@6Nj%<6Mh26=@S09uz{AUAY%<xD
z59AD9K4S}*A;B5>MUx%)G(al&OpIW{KKXg+lO6fgLBhNyaJP8|`@=**o-^b(04ZQH
vwVa&GZ#FreONiOn+;H-G9!Dl~i^-pOj3*Ze3T)oYuf;g|ognArwSt`h@S<aK

diff --git a/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po b/package/po/ru/plasma_applet_org.kde.userbase.plasma.luna3.po
index 45210149b97956ea5a44dc97b9a583220f00dffa..4d36e2ce87c2cc72f18eb19981b62d0b365ad549 100644
GIT binary patch
delta 844
zcmbQK``dU!DkF!Hp@M;>m4VsjT*e;8$qSf-<t(|BbrjM{tEwuwa*NY5Qxue(ON&eL
za}_*u6Vp>CmkR_>Uce+IVr&YNc1bKrRS3v0C@q+5&nGuIfmvWPAF~)cqxs}OZecmF
zF1^Cs94m7pm=53k{5*x^{G9xv$@YADOqLcPl{^TQmd2A;a3wMs8iU035aNag78s5T
zC`v8M%r7m5I8TXdvbdP}<QH6uOeQ8E-HJ%MjWN9zkeNJrCa)W_p()r6T1cu*jWO)<
zORXq@+mj|{Joy=yGLyLx$R1uKoo42fxw+FMEetRW2*^k*PF0w^fh&U9$jD&wa-Kvc
zBeTg|ymm|`29v#botVtP&OkEE$iQgwBVKzZ19V%AjLjx1^LaBFSWFHSOl2}OoxDTP
zZ*m+r8<J*2bK}Xy+<qt`mXj}Vn<I-@m`)bsap3_+AUK{(%qAD`c_9gy8B9LOmx?T4
zGTD|t7Fobz@=E?tBmr}y$-Dx-$O2}QGX=7c1T0J^KN5(VoGm1<Sxo3U<76!k9uP;_
z+zd0+U{UN`nVgdfjbaTBK9G7b3v*bi3dv7NtW+;n0I8b%kyjQZEo+IHV!*KoQj|J*
zhw%5w=3G+D%5@5p1G!8M>lC0#-X*g*TfrHWLY26b!J@?_MG8t6mR;C%Ve7>vg$uhc
PHec9#v3v7t5k5u$l<Wvq

delta 384
zcmexuJX3c=DkF!1rGlY_m7&4rT*e;8$pWmRn=dkpv2$B;DeEYtl~z?%a!pQ>P@3E>
zVLCaQQ(*E19swpxgUK1(iHxR`3;9GQujUPAGBun0Uchg1y#Nohp_$QSFF|uC+hTH`
zpbLo2Z)k4Dm0O&inWCT+kdatCSyNng@&P_!CIj=yMSO`&h9;A*^4T#NnNJqwcj7fQ
zg{gJPES@}z$Bo&@!eDYGzdcCZEq-q%BZJBJ1idEL3-B@-n@lzlN`){jCNC9=1v5>I
zCi4l0LYQWg^M!rEOjCo&Cxo*gOv}l3B2kkM@Ch*+n;TA67f59?x0u`~;5YfNh`{C*
zBG(xwuMj^Zn2}hVst{0=T9%nwuEeEWr!ZN8Pk-}A2`)xC5D(@fkb?ZuVuj4y#Pn2%
Wx_x5i5_Jkt1%9a&CCHKryv6_pp>YcU

diff --git a/src/shadow.frag b/src/shadow.frag
index 9f0e5d2..56a5cf5 100644
--- a/src/shadow.frag
+++ b/src/shadow.frag
@@ -5,6 +5,7 @@ layout(std140, binding = 0) uniform buf {
     mat4 qt_Matrix;
     float qt_Opacity;
     int transparent;
+    float shadow_Opacity;
 
 };
 layout(binding = 1) uniform sampler2D source;
@@ -13,12 +14,10 @@ layout(binding = 3) uniform sampler2D mask;
 
 void main() {
     fragColor = vec4(
-        ((1 - transparent)* texture(source, qt_TexCoord0) * (1- texture(shadow, qt_TexCoord0))
+        ((1 - transparent) * texture(source, qt_TexCoord0) * (1 - shadow_Opacity * texture(shadow, qt_TexCoord0))
         + transparent * texture(source, qt_TexCoord0)).rgb,
                      texture(source, qt_TexCoord0).a)
     * texture(mask, qt_TexCoord0).a
-    * (1 - texture(shadow, qt_TexCoord0).a * transparent)
+    * (1 - shadow_Opacity * texture(shadow, qt_TexCoord0).a * transparent)
     * qt_Opacity ;
 }
-
-
-- 
GitLab