From 9de8dea4432ac55a4b8f717e6c5cc91f3f7fdaf8 Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Mon, 27 Feb 2023 13:19:35 +0700 Subject: add material svg icon and color overlay --- ListInlineItem.ui.qml | 12 ++++++++++-- Material.qrc | 5 +++++ Material/svg/filled/school.svg | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Material.qrc create mode 100644 Material/svg/filled/school.svg diff --git a/ListInlineItem.ui.qml b/ListInlineItem.ui.qml index 324327d..6f623e7 100644 --- a/ListInlineItem.ui.qml +++ b/ListInlineItem.ui.qml @@ -1,6 +1,8 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 +import QtGraphicalEffects 1.12 + RowLayout { id:listInline @@ -17,15 +19,21 @@ RowLayout { Layout.minimumWidth: 42 Image { - id: image + id: inlineItemIcon anchors.verticalCenter: parent.verticalCenter - source: "qrc:/qtquickplugin/images/template_image.png" + source: "Material/svg/filled/school.svg" anchors.horizontalCenter: parent.horizontalCenter fillMode: Image.PreserveAspectFit Layout.preferredHeight: 12 Layout.preferredWidth: 12 Layout.minimumHeight: 12 Layout.minimumWidth: 12 + + ColorOverlay{ + anchors.fill: inlineItemIcon + source: inlineItemIcon + color: "#fd7e14" + } } } Label { diff --git a/Material.qrc b/Material.qrc new file mode 100644 index 0000000..4d8faf5 --- /dev/null +++ b/Material.qrc @@ -0,0 +1,5 @@ + + + Material/svg/filled/school.svg + + diff --git a/Material/svg/filled/school.svg b/Material/svg/filled/school.svg new file mode 100644 index 0000000..5cec16b --- /dev/null +++ b/Material/svg/filled/school.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.2.3