diff --git a/qml/IconItemDelegate.qml b/qml/IconItemDelegate.qml index e19712b9..20023b90 100644 --- a/qml/IconItemDelegate.qml +++ b/qml/IconItemDelegate.qml @@ -5,6 +5,7 @@ import QtQuick 2.15 import QtQml.Models 2.15 import QtQuick.Controls 2.15 +import QtQuick.Layouts 2.15 import org.deepin.dtk 1.0 import org.deepin.dtk.private 1.0 import org.deepin.dtk 1.0 as D @@ -110,11 +111,33 @@ Control { Component { id: folderComponent - Image { - id: iconImage + Rectangle { anchors.fill: parent - source: "image://folder-icon/" + icons.join(':') - sourceSize: Qt.size(parent.width, parent.height) + color: "#26FFFFFF" + radius: 12 + + GridLayout { + anchors.fill: parent + rows: 2 + columns: 2 + anchors.margins: 8 + columnSpacing: 8 + rowSpacing: 8 + + Repeater { + model:icons + + DciIcon { + Layout.fillHeight: true + Layout.fillWidth: true + + name: modelData + sourceSize: Qt.size(parent.width / 2, parent.height / 2) + palette: DTK.makeIconPalette(root.palette) + theme: ApplicationHelper.DarkType + } + } + } } }