1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

manual weather coords

This commit is contained in:
bbedward
2025-09-10 08:49:12 -04:00
parent a77f6eb385
commit 9438868706
2 changed files with 48 additions and 10 deletions

View File

@@ -242,6 +242,47 @@ Item {
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 {
width: parent.width
currentLocation: SettingsData.weatherLocation