@@ -28,17 +28,17 @@ Item {
28
28
signal valueChanged (var value, bool isNull)
29
29
30
30
property var image: image
31
- property var cameraIcon: QgsQuick . Utils . getThemeIcon ( " ic_camera " )
32
- property var deleteIcon: QgsQuick . Utils . getThemeIcon ( " ic_delete_forever_white " )
33
- property var galleryIcon: QgsQuick . Utils . getThemeIcon ( " ic_gallery " )
34
- property var brokenImageSource : QgsQuick . Utils . getThemeIcon ( " ic_broken_image_black " )
35
- property var notavailableImageSource : QgsQuick . Utils . getThemeIcon ( " ic_photo_notavailable_white " )
36
- property real iconSize: customStyle .height * 0.75
31
+ property var cameraIcon: customStyle . icons . camera
32
+ property var deleteIcon: customStyle . icons . remove
33
+ property var galleryIcon: customStyle . icons . gallery
34
+ property var brokenImageIcon : customStyle . icons . brokenImage
35
+ property var notAvailableImageIcon : customStyle . icons . notAvailable
36
+ property real iconSize: customStyle .fields . height * 0.75
37
37
property real textMargin: QgsQuick .Utils .dp * 10
38
38
39
39
id: fieldItem
40
40
enabled: true // its interactive widget
41
- height: customStyle .height * 3
41
+ height: customStyle .fields . height * 3
42
42
anchors {
43
43
left: parent .left
44
44
right: parent .right
@@ -66,15 +66,15 @@ Item {
66
66
height: window .height
67
67
width: window .width
68
68
edge: Qt .RightEdge
69
- imageButtonSize: customStyle . height
69
+ imageButtonSize: fieldItem . iconSize
70
70
}
71
71
72
72
Rectangle {
73
73
id: imageContainer
74
74
width: parent .width
75
- height: customStyle .height * 3
76
- color: customStyle .backgroundColor
77
- radius: customStyle .cornerRadius
75
+ height: parent .height
76
+ color: customStyle .fields . backgroundColor
77
+ radius: customStyle .fields . cornerRadius
78
78
79
79
Image {
80
80
property var currentValue: value
@@ -145,7 +145,7 @@ Item {
145
145
ColorOverlay {
146
146
anchors .fill : deleteIcon
147
147
source: deleteIcon
148
- color: customStyle .attentionColor
148
+ color: customStyle .fields . attentionColor
149
149
}
150
150
}
151
151
@@ -159,7 +159,8 @@ Item {
159
159
QgsQuick .IconTextItem {
160
160
id: photoButton
161
161
iconSize: fieldItem .iconSize
162
- fontColor: customStyle .fontColor
162
+ fontColor: customStyle .fields .fontColor
163
+ fontPixelSize: fieldItem .iconSize / 2
163
164
iconSource: fieldItem .cameraIcon
164
165
labelText: qsTr (" Take a Photo" )
165
166
@@ -180,7 +181,8 @@ Item {
180
181
QgsQuick .IconTextItem {
181
182
id: browseButton
182
183
iconSize: fieldItem .iconSize
183
- fontColor: customStyle .fontColor
184
+ fontColor: customStyle .fields .fontColor
185
+ fontPixelSize: fieldItem .iconSize / 2
184
186
iconSource: fieldItem .galleryIcon
185
187
labelText: qsTr (" Add From a Gallery" )
186
188
@@ -198,8 +200,8 @@ Item {
198
200
QgsQuick .IconTextItem {
199
201
id: infoItem
200
202
iconSize: fieldItem .iconSize / 2
201
- fontColor: customStyle .fontColor
202
- iconSource: fieldItem .brokenImageSource
203
+ fontColor: customStyle .fields . fontColor
204
+ iconSource: fieldItem .brokenImageIcon
203
205
labelText: qsTr (" Image is broken: " ) + image .currentValue
204
206
205
207
visible: fieldItem .state === " broken" || fieldItem .state === " notAvailable"
0 commit comments