mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-31 00:42:50 -05:00
manual weather coords
This commit is contained in:
@@ -59,6 +59,13 @@ Singleton {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Quickshell.execDetached(["mkdir", "-p", stateDir])
|
Quickshell.execDetached(["mkdir", "-p", stateDir])
|
||||||
|
matugenCheck.running = true
|
||||||
|
if (typeof SessionData !== "undefined")
|
||||||
|
SessionData.isLightModeChanged.connect(root.onLightModeChanged)
|
||||||
|
|
||||||
|
if (typeof SettingsData !== "undefined" && SettingsData.currentThemeName) {
|
||||||
|
switchTheme(SettingsData.currentThemeName, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMatugenColor(path, fallback) {
|
function getMatugenColor(path, fallback) {
|
||||||
@@ -759,16 +766,6 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
matugenCheck.running = true
|
|
||||||
if (typeof SessionData !== "undefined")
|
|
||||||
SessionData.isLightModeChanged.connect(root.onLightModeChanged)
|
|
||||||
|
|
||||||
if (typeof SettingsData !== "undefined" && SettingsData.currentThemeName) {
|
|
||||||
switchTheme(SettingsData.currentThemeName, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: customThemeFileView
|
id: customThemeFileView
|
||||||
watchChanges: currentTheme === "custom"
|
watchChanges: currentTheme === "custom"
|
||||||
|
|||||||
@@ -242,6 +242,47 @@ Item {
|
|||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
width: parent.width
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
|
DankTextField {
|
||||||
|
id: latitudeInput
|
||||||
|
width: (parent.width - Theme.spacingM) / 2
|
||||||
|
height: 48
|
||||||
|
placeholderText: "Latitude"
|
||||||
|
text: SettingsData.weatherCoordinates ? SettingsData.weatherCoordinates.split(',')[0] : ""
|
||||||
|
backgroundColor: Theme.surfaceVariant
|
||||||
|
normalBorderColor: Theme.primarySelected
|
||||||
|
focusedBorderColor: Theme.primary
|
||||||
|
onTextEdited: {
|
||||||
|
if (text && longitudeInput.text) {
|
||||||
|
const coords = text + "," + longitudeInput.text
|
||||||
|
const displayName = `${text}, ${longitudeInput.text}`
|
||||||
|
SettingsData.setWeatherLocation(displayName, coords)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DankTextField {
|
||||||
|
id: longitudeInput
|
||||||
|
width: (parent.width - Theme.spacingM) / 2
|
||||||
|
height: 48
|
||||||
|
placeholderText: "Longitude"
|
||||||
|
text: SettingsData.weatherCoordinates ? SettingsData.weatherCoordinates.split(',')[1] : ""
|
||||||
|
backgroundColor: Theme.surfaceVariant
|
||||||
|
normalBorderColor: Theme.primarySelected
|
||||||
|
focusedBorderColor: Theme.primary
|
||||||
|
onTextEdited: {
|
||||||
|
if (text && latitudeInput.text) {
|
||||||
|
const coords = latitudeInput.text + "," + text
|
||||||
|
const displayName = `${latitudeInput.text}, ${text}`
|
||||||
|
SettingsData.setWeatherLocation(displayName, coords)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DankLocationSearch {
|
DankLocationSearch {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
currentLocation: SettingsData.weatherLocation
|
currentLocation: SettingsData.weatherLocation
|
||||||
|
|||||||
Reference in New Issue
Block a user