Commit bed89d66 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Mouse Cursor KCM] Restore cursor preview in size combo

The icon generation code was still there but the UI didn't show it.

Reviewed-By: David Edmundson
parent 5f59b733
......@@ -17,6 +17,7 @@
*/
import QtQuick 2.7
import QtQuick.Window 2.2 // for Screen
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.2 as QtControls
import QtQuick.Dialogs 1.1 as QtDialogs
......@@ -102,6 +103,33 @@ KCM.GridViewKCM {
onCurrentTextChanged: {
kcm.preferredSize = isNaN(parseInt(sizeCombo.currentText)) ? 0 : parseInt(sizeCombo.currentText);
}
delegate: QtControls.ItemDelegate {
id: sizeComboDelegate
readonly property int size: parseInt(model.display)
width: parent.width
highlighted: ListView.isCurrentItem
text: model.display
contentItem: RowLayout {
Kirigami.Icon {
id: aiken
source: model.decoration
smooth: true
width: sizeComboDelegate.size / Screen.devicePixelRatio
height: sizeComboDelegate.size / Screen.devicePixelRatio
visible: valid && sizeComboDelegate.size > 0
}
QtControls.Label {
Layout.fillWidth: true
color: sizeComboDelegate.highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
text: model[sizeCombo.textRole]
}
}
}
}
}
RowLayout {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment