Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/config.qml
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 76 | Row { | |||
---|---|---|---|---|---|
77 | //x: formAlignment - positionLabel.paintedWidth | 77 | //x: formAlignment - positionLabel.paintedWidth | ||
78 | spacing: units.largeSpacing / 2 | 78 | spacing: units.largeSpacing / 2 | ||
79 | QtControls.Label { | 79 | QtControls.Label { | ||
80 | id: positionLabel | 80 | id: positionLabel | ||
81 | width: formAlignment - units.largeSpacing | 81 | width: formAlignment - units.largeSpacing | ||
82 | anchors { | 82 | anchors { | ||
83 | verticalCenter: resizeComboBox.verticalCenter | 83 | verticalCenter: resizeComboBox.verticalCenter | ||
84 | } | 84 | } | ||
85 | text: i18nd("plasma_applet_org.kde.image", "Positioning:") | 85 | text: i18nd("plasma_wallpaper_org.kde.image", "Positioning:") | ||
86 | horizontalAlignment: Text.AlignRight | 86 | horizontalAlignment: Text.AlignRight | ||
87 | } | 87 | } | ||
88 | QtControls.ComboBox { | 88 | QtControls.ComboBox { | ||
89 | id: resizeComboBox | 89 | id: resizeComboBox | ||
90 | property int textLength: 24 | 90 | property int textLength: 24 | ||
91 | width: theme.mSize(theme.defaultFont).width * textLength | 91 | width: theme.mSize(theme.defaultFont).width * textLength | ||
92 | model: [ | 92 | model: [ | ||
93 | { | 93 | { | ||
94 | 'label': i18nd("plasma_applet_org.kde.image", "Scaled and Cropped"), | 94 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"), | ||
95 | 'fillMode': Image.PreserveAspectCrop | 95 | 'fillMode': Image.PreserveAspectCrop | ||
96 | }, | 96 | }, | ||
97 | { | 97 | { | ||
98 | 'label': i18nd("plasma_applet_org.kde.image","Scaled"), | 98 | 'label': i18nd("plasma_wallpaper_org.kde.image","Scaled"), | ||
99 | 'fillMode': Image.Stretch | 99 | 'fillMode': Image.Stretch | ||
100 | }, | 100 | }, | ||
101 | { | 101 | { | ||
102 | 'label': i18nd("plasma_applet_org.kde.image","Scaled, Keep Proportions"), | 102 | 'label': i18nd("plasma_wallpaper_org.kde.image","Scaled, Keep Proportions"), | ||
103 | 'fillMode': Image.PreserveAspectFit | 103 | 'fillMode': Image.PreserveAspectFit | ||
104 | }, | 104 | }, | ||
105 | { | 105 | { | ||
106 | 'label': i18nd("plasma_applet_org.kde.image", "Centered"), | 106 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Centered"), | ||
107 | 'fillMode': Image.Pad | 107 | 'fillMode': Image.Pad | ||
108 | }, | 108 | }, | ||
109 | { | 109 | { | ||
110 | 'label': i18nd("plasma_applet_org.kde.image","Tiled"), | 110 | 'label': i18nd("plasma_wallpaper_org.kde.image","Tiled"), | ||
111 | 'fillMode': Image.Tile | 111 | 'fillMode': Image.Tile | ||
112 | } | 112 | } | ||
113 | ] | 113 | ] | ||
114 | 114 | | |||
115 | textRole: "label" | 115 | textRole: "label" | ||
116 | onCurrentIndexChanged: cfg_FillMode = model[currentIndex]["fillMode"] | 116 | onCurrentIndexChanged: cfg_FillMode = model[currentIndex]["fillMode"] | ||
117 | Component.onCompleted: setMethod(); | 117 | Component.onCompleted: setMethod(); | ||
118 | 118 | | |||
Show All 15 Lines | 133 | Row { | |||
134 | id: blurRow | 134 | id: blurRow | ||
135 | spacing: units.largeSpacing / 2 | 135 | spacing: units.largeSpacing / 2 | ||
136 | visible: cfg_FillMode === Image.PreserveAspectFit || cfg_FillMode === Image.Pad | 136 | visible: cfg_FillMode === Image.PreserveAspectFit || cfg_FillMode === Image.Pad | ||
137 | QtControls.Label { | 137 | QtControls.Label { | ||
138 | id: blurLabel | 138 | id: blurLabel | ||
139 | width: formAlignment - units.largeSpacing | 139 | width: formAlignment - units.largeSpacing | ||
140 | anchors.verticalCenter: blurRadioButton.verticalCenter | 140 | anchors.verticalCenter: blurRadioButton.verticalCenter | ||
141 | horizontalAlignment: Text.AlignRight | 141 | horizontalAlignment: Text.AlignRight | ||
142 | text: i18nd("plasma_applet_org.kde.image", "Background:") | 142 | text: i18nd("plasma_wallpaper_org.kde.image", "Background:") | ||
143 | } | 143 | } | ||
144 | QtControls.RadioButton { | 144 | QtControls.RadioButton { | ||
145 | id: blurRadioButton | 145 | id: blurRadioButton | ||
146 | text: i18nd("plasma_applet_org.kde.image", "Blur") | 146 | text: i18nd("plasma_wallpaper_org.kde.image", "Blur") | ||
147 | exclusiveGroup: backgroundGroup | 147 | exclusiveGroup: backgroundGroup | ||
148 | } | 148 | } | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | QtDialogs.ColorDialog { | 151 | QtDialogs.ColorDialog { | ||
152 | id: colorDialog | 152 | id: colorDialog | ||
153 | modality: Qt.WindowModal | 153 | modality: Qt.WindowModal | ||
154 | showAlphaChannel: false | 154 | showAlphaChannel: false | ||
155 | title: i18nd("plasma_applet_org.kde.image", "Select Background Color") | 155 | title: i18nd("plasma_wallpaper_org.kde.image", "Select Background Color") | ||
156 | } | 156 | } | ||
157 | 157 | | |||
158 | Row { | 158 | Row { | ||
159 | id: colorRow | 159 | id: colorRow | ||
160 | visible: cfg_FillMode === Image.PreserveAspectFit || cfg_FillMode === Image.Pad | 160 | visible: cfg_FillMode === Image.PreserveAspectFit || cfg_FillMode === Image.Pad | ||
161 | spacing: units.largeSpacing / 2 | 161 | spacing: units.largeSpacing / 2 | ||
162 | QtControls.Label { | 162 | QtControls.Label { | ||
163 | width: formAlignment - units.largeSpacing | 163 | width: formAlignment - units.largeSpacing | ||
164 | } | 164 | } | ||
165 | QtControls.RadioButton { | 165 | QtControls.RadioButton { | ||
166 | id: colorRadioButton | 166 | id: colorRadioButton | ||
167 | text: i18nd("plasma_applet_org.kde.image", "Solid color") | 167 | text: i18nd("plasma_wallpaper_org.kde.image", "Solid color") | ||
168 | exclusiveGroup: backgroundGroup | 168 | exclusiveGroup: backgroundGroup | ||
169 | checked: !cfg_Blur | 169 | checked: !cfg_Blur | ||
170 | } | 170 | } | ||
171 | QtControls.Button { | 171 | QtControls.Button { | ||
172 | id: colorButton | 172 | id: colorButton | ||
173 | width: units.gridUnit * 3 | 173 | width: units.gridUnit * 3 | ||
174 | text: " " // needed to it gets a proper height... | 174 | text: " " // needed to it gets a proper height... | ||
175 | onClicked: colorDialog.open() | 175 | onClicked: colorDialog.open() | ||
Show All 21 Lines | 189 | ColumnLayout { | |||
197 | //FIXME: there should be only one spinbox: QtControls spinboxes are still too limited for it tough | 197 | //FIXME: there should be only one spinbox: QtControls spinboxes are still too limited for it tough | ||
198 | RowLayout { | 198 | RowLayout { | ||
199 | Layout.fillWidth: true | 199 | Layout.fillWidth: true | ||
200 | spacing: units.largeSpacing / 2 | 200 | spacing: units.largeSpacing / 2 | ||
201 | QtControls.Label { | 201 | QtControls.Label { | ||
202 | Layout.minimumWidth: formAlignment - units.largeSpacing | 202 | Layout.minimumWidth: formAlignment - units.largeSpacing | ||
203 | anchors.verticalCenter: parent.verticalCenter | 203 | anchors.verticalCenter: parent.verticalCenter | ||
204 | horizontalAlignment: Text.AlignRight | 204 | horizontalAlignment: Text.AlignRight | ||
205 | text: i18nd("plasma_applet_org.kde.image","Change every:") | 205 | text: i18nd("plasma_wallpaper_org.kde.image","Change every:") | ||
206 | } | 206 | } | ||
207 | QtControls.SpinBox { | 207 | QtControls.SpinBox { | ||
208 | id: hoursInterval | 208 | id: hoursInterval | ||
209 | anchors.verticalCenter: parent.verticalCenter | 209 | anchors.verticalCenter: parent.verticalCenter | ||
210 | Layout.minimumWidth: textMetrics.width + units.gridUnit | 210 | Layout.minimumWidth: textMetrics.width + units.gridUnit | ||
211 | width: units.gridUnit * 3 | 211 | width: units.gridUnit * 3 | ||
212 | decimals: 0 | 212 | decimals: 0 | ||
213 | value: root.hoursIntervalValue | 213 | value: root.hoursIntervalValue | ||
214 | minimumValue: 0 | 214 | minimumValue: 0 | ||
215 | maximumValue: 24 | 215 | maximumValue: 24 | ||
216 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | 216 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | ||
217 | } | 217 | } | ||
218 | QtControls.Label { | 218 | QtControls.Label { | ||
219 | anchors.verticalCenter: parent.verticalCenter | 219 | anchors.verticalCenter: parent.verticalCenter | ||
220 | text: i18nd("plasma_applet_org.kde.image","Hours") | 220 | text: i18nd("plasma_wallpaper_org.kde.image","Hours") | ||
221 | } | 221 | } | ||
222 | Item { | 222 | Item { | ||
223 | Layout.preferredWidth: units.gridUnit | 223 | Layout.preferredWidth: units.gridUnit | ||
224 | } | 224 | } | ||
225 | QtControls.SpinBox { | 225 | QtControls.SpinBox { | ||
226 | id: minutesInterval | 226 | id: minutesInterval | ||
227 | anchors.verticalCenter: parent.verticalCenter | 227 | anchors.verticalCenter: parent.verticalCenter | ||
228 | Layout.minimumWidth: textMetrics.width + units.gridUnit | 228 | Layout.minimumWidth: textMetrics.width + units.gridUnit | ||
229 | width: units.gridUnit * 3 | 229 | width: units.gridUnit * 3 | ||
230 | decimals: 0 | 230 | decimals: 0 | ||
231 | value: root.minutesIntervalValue | 231 | value: root.minutesIntervalValue | ||
232 | minimumValue: 0 | 232 | minimumValue: 0 | ||
233 | maximumValue: 60 | 233 | maximumValue: 60 | ||
234 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | 234 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | ||
235 | } | 235 | } | ||
236 | QtControls.Label { | 236 | QtControls.Label { | ||
237 | anchors.verticalCenter: parent.verticalCenter | 237 | anchors.verticalCenter: parent.verticalCenter | ||
238 | text: i18nd("plasma_applet_org.kde.image","Minutes") | 238 | text: i18nd("plasma_wallpaper_org.kde.image","Minutes") | ||
239 | } | 239 | } | ||
240 | Item { | 240 | Item { | ||
241 | Layout.preferredWidth: units.gridUnit | 241 | Layout.preferredWidth: units.gridUnit | ||
242 | } | 242 | } | ||
243 | QtControls.SpinBox { | 243 | QtControls.SpinBox { | ||
244 | id: secondsInterval | 244 | id: secondsInterval | ||
245 | anchors.verticalCenter: parent.verticalCenter | 245 | anchors.verticalCenter: parent.verticalCenter | ||
246 | Layout.minimumWidth: textMetrics.width + units.gridUnit | 246 | Layout.minimumWidth: textMetrics.width + units.gridUnit | ||
247 | width: units.gridUnit * 3 | 247 | width: units.gridUnit * 3 | ||
248 | decimals: 0 | 248 | decimals: 0 | ||
249 | value: root.secondsIntervalValue | 249 | value: root.secondsIntervalValue | ||
250 | minimumValue: root.hoursIntervalValue === 0 && root.minutesIntervalValue === 0 ? 1 : 0 | 250 | minimumValue: root.hoursIntervalValue === 0 && root.minutesIntervalValue === 0 ? 1 : 0 | ||
251 | maximumValue: 60 | 251 | maximumValue: 60 | ||
252 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | 252 | onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value | ||
253 | } | 253 | } | ||
254 | QtControls.Label { | 254 | QtControls.Label { | ||
255 | anchors.verticalCenter: parent.verticalCenter | 255 | anchors.verticalCenter: parent.verticalCenter | ||
256 | text: i18nd("plasma_applet_org.kde.image","Seconds") | 256 | text: i18nd("plasma_wallpaper_org.kde.image","Seconds") | ||
257 | } | 257 | } | ||
258 | } | 258 | } | ||
259 | QtControls.ScrollView { | 259 | QtControls.ScrollView { | ||
260 | Layout.fillHeight: true; | 260 | Layout.fillHeight: true; | ||
261 | Layout.fillWidth: true | 261 | Layout.fillWidth: true | ||
262 | frameVisible: true | 262 | frameVisible: true | ||
263 | ListView { | 263 | ListView { | ||
264 | id: slidePathsView | 264 | id: slidePathsView | ||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | |||||
384 | RowLayout { | 384 | RowLayout { | ||
385 | id: buttonsRow | 385 | id: buttonsRow | ||
386 | anchors { | 386 | anchors { | ||
387 | right: parent.right | 387 | right: parent.right | ||
388 | } | 388 | } | ||
389 | QtControls.Button { | 389 | QtControls.Button { | ||
390 | visible: (configDialog.currentWallpaper == "org.kde.slideshow") | 390 | visible: (configDialog.currentWallpaper == "org.kde.slideshow") | ||
391 | iconName: "list-add" | 391 | iconName: "list-add" | ||
392 | text: i18nd("plasma_applet_org.kde.image","Add Folder...") | 392 | text: i18nd("plasma_wallpaper_org.kde.image","Add Folder...") | ||
393 | onClicked: imageWallpaper.showAddSlidePathsDialog() | 393 | onClicked: imageWallpaper.showAddSlidePathsDialog() | ||
394 | } | 394 | } | ||
395 | QtControls.Button { | 395 | QtControls.Button { | ||
396 | visible: (configDialog.currentWallpaper == "org.kde.image") | 396 | visible: (configDialog.currentWallpaper == "org.kde.image") | ||
397 | iconName: "list-add" | 397 | iconName: "list-add" | ||
398 | text: i18nd("plasma_applet_org.kde.image","Add Image...") | 398 | text: i18nd("plasma_wallpaper_org.kde.image","Add Image...") | ||
399 | onClicked: imageWallpaper.showFileDialog(); | 399 | onClicked: imageWallpaper.showFileDialog(); | ||
400 | } | 400 | } | ||
401 | QtControls.Button { | 401 | QtControls.Button { | ||
402 | iconName: "get-hot-new-stuff" | 402 | iconName: "get-hot-new-stuff" | ||
403 | text: i18nd("plasma_applet_org.kde.image","Get New Wallpapers...") | 403 | text: i18nd("plasma_wallpaper_org.kde.image","Get New Wallpapers...") | ||
404 | visible: KAuthorized.authorize("ghns") | 404 | visible: KAuthorized.authorize("ghns") | ||
405 | onClicked: imageWallpaper.getNewWallpaper(this); | 405 | onClicked: imageWallpaper.getNewWallpaper(this); | ||
406 | } | 406 | } | ||
407 | } | 407 | } | ||
408 | } | 408 | } |