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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user