mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-26 22:42:50 -05:00
Add labels for weather
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -6,6 +6,17 @@ import qs.Widgets
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
activeFocusOnTab: true
|
||||
|
||||
KeyNavigation.tab: keyNavigationTab
|
||||
KeyNavigation.backtab: keyNavigationBacktab
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (activeFocus) {
|
||||
textInput.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
property alias text: textInput.text
|
||||
property string placeholderText: ""
|
||||
property alias font: textInput.font
|
||||
@@ -32,6 +43,8 @@ StyledRect {
|
||||
property real bottomPadding: Theme.spacingM
|
||||
property bool ignoreLeftRightKeys: false
|
||||
property var keyForwardTargets: []
|
||||
property Item keyNavigationTab: null
|
||||
property Item keyNavigationBacktab: null
|
||||
|
||||
signal textEdited
|
||||
signal editingFinished
|
||||
@@ -89,6 +102,9 @@ StyledRect {
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
selectByMouse: !root.ignoreLeftRightKeys
|
||||
clip: true
|
||||
activeFocusOnTab: true
|
||||
KeyNavigation.tab: root.keyNavigationTab
|
||||
KeyNavigation.backtab: root.keyNavigationBacktab
|
||||
onTextChanged: root.textEdited()
|
||||
onEditingFinished: root.editingFinished()
|
||||
onAccepted: root.accepted()
|
||||
|
||||
Reference in New Issue
Block a user