1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-12 00:32:17 -04:00

Add labels for weather

This commit is contained in:
bbedward
2025-09-23 16:01:39 -04:00
parent ec4f0ff2ed
commit 8e010478c7
3 changed files with 161 additions and 45 deletions

View File

@@ -7,11 +7,24 @@ import qs.Widgets
Item {
id: root
activeFocusOnTab: true
KeyNavigation.tab: keyNavigationTab
KeyNavigation.backtab: keyNavigationBacktab
onActiveFocusChanged: {
if (activeFocus) {
locationInput.forceActiveFocus()
}
}
property string currentLocation: ""
property string placeholderText: "Search for a location..."
property bool _internalChange: false
property bool isLoading: false
property string currentSearchText: ""
property Item keyNavigationTab: null
property Item keyNavigationBacktab: null
signal locationSelected(string displayName, string coordinates)
@@ -131,10 +144,12 @@ Item {
height: parent.height
leftIconName: "search"
placeholderText: root.placeholderText
text: root.currentLocation
text: ""
backgroundColor: Theme.surfaceVariant
normalBorderColor: Theme.primarySelected
focusedBorderColor: Theme.primary
keyNavigationTab: root.keyNavigationTab
keyNavigationBacktab: root.keyNavigationBacktab
onTextEdited: {
if (root._internalChange)
return