Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/config.qml
Show All 24 Lines | |||||
25 | //We need units from it | 25 | //We need units from it | ||
26 | import org.kde.plasma.core 2.0 as Plasmacore | 26 | import org.kde.plasma.core 2.0 as Plasmacore | ||
27 | import org.kde.plasma.wallpapers.image 2.0 as Wallpaper | 27 | import org.kde.plasma.wallpapers.image 2.0 as Wallpaper | ||
28 | import org.kde.kquickcontrols 2.0 as KQuickControls | 28 | import org.kde.kquickcontrols 2.0 as KQuickControls | ||
29 | import org.kde.kquickcontrolsaddons 2.0 | 29 | import org.kde.kquickcontrolsaddons 2.0 | ||
30 | import org.kde.kconfig 1.0 // for KAuthorized | 30 | import org.kde.kconfig 1.0 // for KAuthorized | ||
31 | import org.kde.draganddrop 2.0 as DragDrop | 31 | import org.kde.draganddrop 2.0 as DragDrop | ||
32 | import org.kde.kcm 1.1 as KCM | 32 | import org.kde.kcm 1.1 as KCM | ||
33 | import org.kde.kirigami 2.5 as Kirigami | ||||
33 | 34 | | |||
34 | ColumnLayout { | 35 | ColumnLayout { | ||
35 | id: root | 36 | id: root | ||
36 | property alias cfg_Color: colorButton.color | 37 | property alias cfg_Color: colorButton.color | ||
37 | property string cfg_Image | 38 | property string cfg_Image | ||
38 | property int cfg_FillMode | 39 | property int cfg_FillMode | ||
39 | property alias cfg_Blur: blurRadioButton.checked | 40 | property alias cfg_Blur: blurRadioButton.checked | ||
40 | property var cfg_SlidePaths: "" | 41 | property var cfg_SlidePaths: "" | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 82 | QtControls.Label { | |||
84 | anchors { | 85 | anchors { | ||
85 | verticalCenter: resizeComboBox.verticalCenter | 86 | verticalCenter: resizeComboBox.verticalCenter | ||
86 | } | 87 | } | ||
87 | text: i18nd("plasma_wallpaper_org.kde.image", "Positioning:") | 88 | text: i18nd("plasma_wallpaper_org.kde.image", "Positioning:") | ||
88 | horizontalAlignment: Text.AlignRight | 89 | horizontalAlignment: Text.AlignRight | ||
89 | } | 90 | } | ||
90 | QtControls.ComboBox { | 91 | QtControls.ComboBox { | ||
91 | id: resizeComboBox | 92 | id: resizeComboBox | ||
92 | property int textLength: 24 | 93 | TextMetrics { | ||
93 | width: theme.mSize(theme.defaultFont).width * textLength | 94 | id: resizeTextMetrics | ||
95 | text: resizeComboBox.currentText | ||||
96 | } | ||||
97 | width: resizeTextMetrics.width + Kirigami.Units.smallSpacing * 2 + Kirigami.Units.gridUnit * 2 | ||||
94 | model: [ | 98 | model: [ | ||
95 | { | 99 | { | ||
96 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"), | 100 | 'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"), | ||
97 | 'fillMode': Image.PreserveAspectCrop | 101 | 'fillMode': Image.PreserveAspectCrop | ||
98 | }, | 102 | }, | ||
99 | { | 103 | { | ||
100 | 'label': i18nd("plasma_wallpaper_org.kde.image","Scaled"), | 104 | 'label': i18nd("plasma_wallpaper_org.kde.image","Scaled"), | ||
101 | 'fillMode': Image.Stretch | 105 | 'fillMode': Image.Stretch | ||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |