Skip to content

Commit

Permalink
fix: folder icons did not update with the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
zsien committed May 28, 2024
1 parent 6c7f0ce commit f5d7c53
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions qml/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
}
}
}

Expand Down

0 comments on commit f5d7c53

Please sign in to comment.