Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/SvgGrid.qml
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 47 | delegate: MouseArea { | |||
---|---|---|---|---|---|
52 | 52 | | |||
53 | function setAsPreview() { | 53 | function setAsPreview() { | ||
54 | print("preview() " + modelData.iconName + " " + modelData.fileName); | 54 | print("preview() " + modelData.iconName + " " + modelData.fileName); | ||
55 | preview.iconName = modelData.iconName | 55 | preview.iconName = modelData.iconName | ||
56 | 56 | | |||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | Rectangle { | 59 | Rectangle { | ||
60 | Kirigami.Theme.textColor: cuttlefish.textcolor | | |||
61 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | | |||
62 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | | |||
63 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | | |||
64 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | | |||
65 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | | |||
66 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | | |||
67 | color: theme.highlightColor | 60 | color: theme.highlightColor | ||
68 | opacity: iconGrid.currentIndex == index ? 1.0 : 0 | 61 | opacity: iconGrid.currentIndex == index ? 1.0 : 0 | ||
69 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | 62 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | ||
70 | anchors { | 63 | anchors { | ||
71 | bottomMargin: -units.gridUnit | 64 | bottomMargin: -units.gridUnit | ||
72 | leftMargin: -units.gridUnit / 2 | 65 | leftMargin: -units.gridUnit / 2 | ||
73 | rightMargin: -units.gridUnit / 2 | 66 | rightMargin: -units.gridUnit / 2 | ||
74 | fill: parent | 67 | fill: parent | ||
75 | } | 68 | } | ||
76 | } | 69 | } | ||
77 | 70 | | |||
78 | Kirigami.Icon { | 71 | Kirigami.Icon { | ||
79 | Kirigami.Theme.textColor: cuttlefish.textcolor | | |||
80 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | | |||
81 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | | |||
82 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | | |||
83 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | | |||
84 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | | |||
85 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | | |||
86 | id: delegateIcon | 72 | id: delegateIcon | ||
87 | width: iconSize | 73 | width: iconSize | ||
88 | height: width | 74 | height: width | ||
89 | source: modelData.iconName | 75 | source: modelData.iconName | ||
90 | anchors { | 76 | anchors { | ||
91 | top: parent.top | 77 | top: parent.top | ||
92 | horizontalCenter: parent.horizontalCenter | 78 | horizontalCenter: parent.horizontalCenter | ||
93 | } | 79 | } | ||
94 | } | 80 | } | ||
95 | 81 | | |||
96 | QQC2.Label { | 82 | QQC2.Label { | ||
97 | Kirigami.Theme.textColor: cuttlefish.textcolor | | |||
98 | Kirigami.Theme.backgroundColor: cuttlefish.bgcolor | | |||
99 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | | |||
100 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | | |||
101 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | | |||
102 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | | |||
103 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | | |||
104 | font.pointSize: iconSize > 96 ? theme.defaultFont.pointSize : theme.smallestFont.pointSize | 83 | font.pointSize: iconSize > 96 ? theme.defaultFont.pointSize : theme.smallestFont.pointSize | ||
105 | text: modelData.fileName + " " + modelData.iconName | 84 | text: modelData.fileName + " " + modelData.iconName | ||
106 | wrapMode: QQC2.Text.Wrap | 85 | wrapMode: QQC2.Text.Wrap | ||
107 | maximumLineCount: 3 | 86 | maximumLineCount: 3 | ||
108 | horizontalAlignment: QQC2.Text.AlignHCenter | 87 | horizontalAlignment: QQC2.Text.AlignHCenter | ||
109 | opacity: iconGrid.currentIndex == index ? 1.0 : 0.7 | 88 | opacity: iconGrid.currentIndex == index ? 1.0 : 0.7 | ||
110 | anchors { | 89 | anchors { | ||
111 | left: parent.left | 90 | left: parent.left | ||
Show All 24 Lines |