Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/config.qml
Show All 34 Lines | 33 | ColumnLayout { | |||
---|---|---|---|---|---|
35 | property alias cfg_Color: colorButton.color | 35 | property alias cfg_Color: colorButton.color | ||
36 | property string cfg_Image | 36 | property string cfg_Image | ||
37 | property int cfg_FillMode | 37 | property int cfg_FillMode | ||
38 | property int cfg_SlideshowMode | 38 | property int cfg_SlideshowMode | ||
39 | property alias cfg_Blur: blurRadioButton.checked | 39 | property alias cfg_Blur: blurRadioButton.checked | ||
40 | property var cfg_SlidePaths: "" | 40 | property var cfg_SlidePaths: "" | ||
41 | property int cfg_SlideInterval: 0 | 41 | property int cfg_SlideInterval: 0 | ||
42 | property var cfg_UncheckedSlides: [] | 42 | property var cfg_UncheckedSlides: [] | ||
43 | property int cfg_AnimationDuration: 400 | ||||
44 | property int cfg_BlurRadius: 40 | ||||
45 | property alias cfg_BlurWallpaper: wallpaperBlurCheckBox.checked | ||||
43 | 46 | | |||
44 | function saveConfig() { | 47 | function saveConfig() { | ||
45 | imageWallpaper.commitDeletion(); | 48 | imageWallpaper.commitDeletion(); | ||
46 | } | 49 | } | ||
47 | 50 | | |||
48 | SystemPalette { | 51 | SystemPalette { | ||
49 | id: syspal | 52 | id: syspal | ||
50 | } | 53 | } | ||
Show All 26 Lines | |||||
77 | property int hoursIntervalValue: Math.floor(cfg_SlideInterval / 3600) | 80 | property int hoursIntervalValue: Math.floor(cfg_SlideInterval / 3600) | ||
78 | property int minutesIntervalValue: Math.floor(cfg_SlideInterval % 3600) / 60 | 81 | property int minutesIntervalValue: Math.floor(cfg_SlideInterval % 3600) / 60 | ||
79 | property int secondsIntervalValue: cfg_SlideInterval % 3600 % 60 | 82 | property int secondsIntervalValue: cfg_SlideInterval % 3600 % 60 | ||
80 | 83 | | |||
81 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | 84 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | ||
82 | 85 | | |||
83 | Kirigami.FormLayout { | 86 | Kirigami.FormLayout { | ||
84 | twinFormLayouts: parentLayout | 87 | twinFormLayouts: parentLayout | ||
88 | | ||||
85 | QtControls2.ComboBox { | 89 | QtControls2.ComboBox { | ||
86 | id: resizeComboBox | 90 | id: resizeComboBox | ||
87 | Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.image", "Positioning:") | 91 | Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.image", "Positioning:") | ||
88 | model: [ | 92 | model: [ | ||
89 | { | 93 | { | ||
90 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"), | 94 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"), | ||
91 | 'fillMode': Image.PreserveAspectCrop | 95 | 'fillMode': Image.PreserveAspectCrop | ||
92 | }, | 96 | }, | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 183 | QtControls2.RadioButton { | |||
182 | checked: !cfg_Blur | 186 | checked: !cfg_Blur | ||
183 | QtControls2.ButtonGroup.group: backgroundGroup | 187 | QtControls2.ButtonGroup.group: backgroundGroup | ||
184 | } | 188 | } | ||
185 | KQuickControls.ColorButton { | 189 | KQuickControls.ColorButton { | ||
186 | id: colorButton | 190 | id: colorButton | ||
187 | dialogTitle: i18nd("plasma_wallpaper_org.kde.image", "Select Background Color") | 191 | dialogTitle: i18nd("plasma_wallpaper_org.kde.image", "Select Background Color") | ||
188 | } | 192 | } | ||
189 | } | 193 | } | ||
194 | | ||||
190 | } | 195 | } | ||
191 | 196 | | |||
192 | Component { | 197 | Component { | ||
193 | id: foldersComponent | 198 | id: foldersComponent | ||
194 | ColumnLayout { | 199 | ColumnLayout { | ||
195 | Connections { | 200 | Connections { | ||
196 | target: root | 201 | target: root | ||
197 | onHoursIntervalValueChanged: hoursInterval.value = root.hoursIntervalValue | 202 | onHoursIntervalValueChanged: hoursInterval.value = root.hoursIntervalValue | ||
▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | 334 | DragDrop.DropArea { | |||
350 | 355 | | |||
351 | Loader { | 356 | Loader { | ||
352 | anchors.fill: parent | 357 | anchors.fill: parent | ||
353 | sourceComponent: (configDialog.currentWallpaper == "org.kde.image") ? thumbnailsComponent : | 358 | sourceComponent: (configDialog.currentWallpaper == "org.kde.image") ? thumbnailsComponent : | ||
354 | ((configDialog.currentWallpaper == "org.kde.slideshow") ? foldersComponent : undefined) | 359 | ((configDialog.currentWallpaper == "org.kde.slideshow") ? foldersComponent : undefined) | ||
355 | } | 360 | } | ||
356 | } | 361 | } | ||
357 | 362 | | |||
363 | Kirigami.FormLayout { | ||||
364 | twinFormLayouts: parentLayout | ||||
365 | Row { | ||||
366 | id: inactiveBlurRow | ||||
367 | spacing: units.largeSpacing / 2 | ||||
368 | Kirigami.FormData.label: i18n("Blur on active window:") | ||||
369 | QtControls2.CheckBox { | ||||
370 | id: wallpaperBlurCheckBox | ||||
371 | anchors.verticalCenter: blurRadiusSpinBox.verticalCenter | ||||
372 | } | ||||
373 | QtControls2.Label { | ||||
374 | anchors.verticalCenter: blurRadiusSpinBox.verticalCenter | ||||
375 | text: i18n(" by ") | ||||
376 | } | ||||
377 | QtControls2.SpinBox { | ||||
378 | id: blurRadiusSpinBox | ||||
379 | value: cfg_BlurRadius | ||||
380 | onValueChanged: cfg_BlurRadius = value | ||||
381 | stepSize: 1 | ||||
382 | from: 1 | ||||
383 | to: 400 | ||||
384 | editable: true | ||||
385 | } | ||||
386 | QtControls2.Label { | ||||
387 | anchors.verticalCenter: blurRadiusSpinBox.verticalCenter | ||||
388 | text: i18n(" over ") | ||||
389 | } | ||||
390 | QtControls2.SpinBox { | ||||
391 | id: animationDurationSpinBox | ||||
392 | value: cfg_AnimationDuration | ||||
393 | onValueChanged: cfg_AnimationDuration = value | ||||
394 | from: 0 | ||||
395 | to: 2000000000 | ||||
396 | stepSize: 100 | ||||
397 | editable: true | ||||
398 | | ||||
399 | textFromValue: function(value, locale) { | ||||
400 | return i18n("%1ms", value) | ||||
401 | } | ||||
402 | valueFromText: function(text, locale) { | ||||
403 | // Number.fromLocaleString() doesn't strip suffix and raises an error. | ||||
404 | // return Number.fromLocaleString(locale, text) | ||||
405 | | ||||
406 | // parseInt does seem to stip non-digit characters, but it probably | ||||
407 | // only works with ASCII digits? | ||||
408 | return parseInt(text, 10) | ||||
409 | } | ||||
410 | } | ||||
411 | } | ||||
412 | } | ||||
413 | | ||||
358 | RowLayout { | 414 | RowLayout { | ||
359 | id: buttonsRow | 415 | id: buttonsRow | ||
360 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter | 416 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter | ||
361 | visible: configDialog.currentWallpaper == "org.kde.image" | 417 | visible: configDialog.currentWallpaper == "org.kde.image" | ||
362 | QtControls2.Button { | 418 | QtControls2.Button { | ||
363 | icon.name: "list-add" | 419 | icon.name: "list-add" | ||
364 | text: i18nd("plasma_wallpaper_org.kde.image","Add Image...") | 420 | text: i18nd("plasma_wallpaper_org.kde.image","Add Image...") | ||
365 | onClicked: imageWallpaper.showFileDialog(); | 421 | onClicked: imageWallpaper.showFileDialog(); | ||
Show All 9 Lines |