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 @@ -34,7 +34,10 @@ ColumnLayout {
34
34
dbcacheSetting .forceActiveFocus ()
35
35
}
36
36
}
37
- onClicked: loadedItem .forceActiveFocus ()
37
+ onClicked: {
38
+ loadedItem .filled = true
39
+ loadedItem .forceActiveFocus ()
40
+ }
38
41
}
39
42
Setting {
40
43
id: parSetting
@@ -48,7 +51,10 @@ ColumnLayout {
48
51
parSetting .forceActiveFocus ()
49
52
}
50
53
}
51
- onClicked: loadedItem .forceActiveFocus ()
54
+ onClicked: {
55
+ loadedItem .filled = true
56
+ loadedItem .forceActiveFocus ()
57
+ }
52
58
}
53
59
Setting {
54
60
Layout .fillWidth : true
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ ColumnLayout {
40
40
pruneTargetSetting .forceActiveFocus ()
41
41
}
42
42
}
43
- onClicked: loadedItem .forceActiveFocus ()
43
+ onClicked: {
44
+ loadedItem .filled = true
45
+ loadedItem .forceActiveFocus ()
46
+ }
44
47
}
45
48
}
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