diff --git a/plugin/contents/config/main.xml b/plugin/contents/config/main.xml
index bc52416..58bb539 100644
--- a/plugin/contents/config/main.xml
+++ b/plugin/contents/config/main.xml
@@ -14,5 +14,11 @@
false
+
+ -24.72
+
+
+ -53.74
+
diff --git a/plugin/contents/ui/config.qml b/plugin/contents/ui/config.qml
index 54e83e0..cc054f0 100644
--- a/plugin/contents/ui/config.qml
+++ b/plugin/contents/ui/config.qml
@@ -9,6 +9,8 @@ ColumnLayout {
property alias cfg_ShowSkeleton: skeletonCheck.checked
property alias cfg_BaladaMode: baladaCheck.checked
property alias cfg_ChuvaMode: chuvaCheck.checked
+ property double cfg_Latitude
+ property double cfg_Longitude
spacing: Kirigami.Units.largeSpacing
@@ -34,5 +36,28 @@ ColumnLayout {
text: i18n("Lua + chuva + relâmpagos")
onCheckedChanged: if (checked) baladaCheck.checked = false
}
+
+ Kirigami.Separator { Kirigami.FormData.isSection: true }
+
+ // Observador do céu realista (aceita vírgula ou ponto decimal)
+ TextField {
+ id: latField
+ Kirigami.FormData.label: i18n("Latitude:")
+ Component.onCompleted: text = root.cfg_Latitude
+ onTextChanged: {
+ const v = parseFloat(text.replace(",", "."))
+ if (!isNaN(v) && v >= -90 && v <= 90) root.cfg_Latitude = v
+ }
+ }
+
+ TextField {
+ id: lonField
+ Kirigami.FormData.label: i18n("Longitude:")
+ Component.onCompleted: text = root.cfg_Longitude
+ onTextChanged: {
+ const v = parseFloat(text.replace(",", "."))
+ if (!isNaN(v) && v >= -180 && v <= 180) root.cfg_Longitude = v
+ }
+ }
}
}
diff --git a/plugin/contents/ui/main.qml b/plugin/contents/ui/main.qml
index 4b3c525..28fee2a 100644
--- a/plugin/contents/ui/main.qml
+++ b/plugin/contents/ui/main.qml
@@ -11,6 +11,8 @@ WallpaperItem {
webView.runJavaScript("setShowSkeleton(" + Plasmoid.configuration.ShowSkeleton + ")")
webView.runJavaScript("setBaladaMode(" + Plasmoid.configuration.BaladaMode + ")")
webView.runJavaScript("setChuvaMode(" + Plasmoid.configuration.ChuvaMode + ")")
+ webView.runJavaScript("setObserverLocation(" + Plasmoid.configuration.Latitude + ","
+ + Plasmoid.configuration.Longitude + ")")
}
Connections {
@@ -18,6 +20,8 @@ WallpaperItem {
function onShowSkeletonChanged() { applyConfig() }
function onBaladaModeChanged() { applyConfig() }
function onChuvaModeChanged() { applyConfig() }
+ function onLatitudeChanged() { applyConfig() }
+ function onLongitudeChanged() { applyConfig() }
}
WebEngineView {