File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ ColumnLayout {
35
35
dbcacheSetting .forceActiveFocus ()
36
36
}
37
37
}
38
- onClicked: loadedItem .forceActiveFocus ()
38
+ onClicked: {
39
+ loadedItem .filled = true
40
+ loadedItem .forceActiveFocus ()
41
+ }
39
42
}
40
43
Separator { Layout .fillWidth : true }
41
44
Setting {
@@ -50,7 +53,10 @@ ColumnLayout {
50
53
parSetting .forceActiveFocus ()
51
54
}
52
55
}
53
- onClicked: loadedItem .forceActiveFocus ()
56
+ onClicked: {
57
+ loadedItem .filled = true
58
+ loadedItem .forceActiveFocus ()
59
+ }
54
60
}
55
61
Separator { Layout .fillWidth : true }
56
62
Setting {
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ ColumnLayout {
41
41
pruneTargetSetting .forceActiveFocus ()
42
42
}
43
43
}
44
- onClicked: loadedItem .forceActiveFocus ()
44
+ onClicked: {
45
+ loadedItem .filled = true
46
+ loadedItem .forceActiveFocus ()
47
+ }
45
48
}
46
49
}
Original file line number Diff line number Diff line change @@ -9,29 +9,33 @@ TextInput {
9
9
id: root
10
10
required property string parentState
11
11
property string description: " "
12
+ property bool filled: false
12
13
property int descriptionSize: 18
13
14
property color textColor
14
- state: root .parentState
15
15
16
16
states: [
17
17
State {
18
- name: " FILLED"
18
+ name: " EMPTY" ; when: ! filled
19
+ PropertyChanges { target: root; textColor: Theme .color .neutral5 }
20
+ },
21
+ State {
22
+ name: " FILLED" ; when: filled && ! (parentState == " HOVER" ) && ! (parentState == " ACTIVE" ) && ! (parentState == " DISABLED" )
19
23
PropertyChanges {
20
24
target: root
21
25
enabled: true
22
26
textColor: Theme .color .neutral9
23
27
}
24
28
},
25
29
State {
26
- name: " HOVER"
30
+ name: " HOVER" ; when : (parentState == " HOVER " ) && filled
27
31
PropertyChanges { target: root; textColor: Theme .color .orangeLight1 }
28
32
},
29
33
State {
30
- name: " ACTIVE"
34
+ name: " ACTIVE" ; when : (parentState == " ACTIVE " )
31
35
PropertyChanges { target: root; textColor: Theme .color .orange }
32
36
},
33
37
State {
34
- name: " DISABLED"
38
+ name: " DISABLED" ; when : (parentState == " DISABLED " )
35
39
PropertyChanges {
36
40
target: root
37
41
enabled: false
You can’t perform that action at this time.
0 commit comments