Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/package/contents/ui/Delegate.qml
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 38 | thumbnail: PreviewWidget { | |||
---|---|---|---|---|---|
43 | width: parent.width * Screen.devicePixelRatio | 43 | width: parent.width * Screen.devicePixelRatio | ||
44 | height: parent.height * Screen.devicePixelRatio | 44 | height: parent.height * Screen.devicePixelRatio | ||
45 | x: Screen.devicePixelRatio % 1 | 45 | x: Screen.devicePixelRatio % 1 | ||
46 | y: Screen.devicePixelRatio % 1 | 46 | y: Screen.devicePixelRatio % 1 | ||
47 | transformOrigin: Item.TopLeft | 47 | transformOrigin: Item.TopLeft | ||
48 | scale: 1 / Screen.devicePixelRatio | 48 | scale: 1 / Screen.devicePixelRatio | ||
49 | themeModel: kcm.cursorsModel | 49 | themeModel: kcm.cursorsModel | ||
50 | currentIndex: index | 50 | currentIndex: index | ||
51 | currentSize: parseInt(sizeCombo.currentText) !== NaN ? parseInt(sizeCombo.currentText) : 0 | 51 | currentSize: kcm.cursorThemeSettings.cursorSize | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | actions: [ | 54 | actions: [ | ||
55 | Kirigami.Action { | 55 | Kirigami.Action { | ||
56 | iconName: "edit-delete" | 56 | iconName: "edit-delete" | ||
57 | tooltip: i18n("Remove Theme") | 57 | tooltip: i18n("Remove Theme") | ||
58 | enabled: model.isWritable | 58 | enabled: model.isWritable | ||
59 | onTriggered: kcm.removeTheme(index); | 59 | onTriggered: kcm.removeTheme(index); | ||
60 | } | 60 | } | ||
61 | ] | 61 | ] | ||
62 | 62 | | |||
63 | onClicked: { | 63 | onClicked: { | ||
64 | view.currentIndex = index; | | |||
65 | view.forceActiveFocus(); | 64 | view.forceActiveFocus(); | ||
65 | kcm.cursorThemeSettings.cursorTheme = kcm.cursorThemeFromIndex(index); | ||||
66 | } | 66 | } | ||
67 | } | 67 | } |