diff options
author | Anatasof Wirapraja <anatasof.wirapraja@gmail.com> | 2023-02-27 13:19:35 +0700 |
---|---|---|
committer | Anatasof Wirapraja <anatasof.wirapraja@gmail.com> | 2023-02-27 13:19:35 +0700 |
commit | 9de8dea4432ac55a4b8f717e6c5cc91f3f7fdaf8 (patch) | |
tree | 8bef62618f73692cd60058de1fb04962e48fcbd3 | |
parent | 6f7c3736c9aad9f1f8fb00df5b17738e9a19389c (diff) |
add material svg icon and color overlay
-rw-r--r-- | ListInlineItem.ui.qml | 12 | ||||
-rw-r--r-- | Material.qrc | 5 | ||||
-rw-r--r-- | Material/svg/filled/school.svg | 1 |
3 files changed, 16 insertions, 2 deletions
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 @@ +<RCC> + <qresource prefix="qeduport"> + <file>Material/svg/filled/school.svg</file> + </qresource> +</RCC> 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 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"/></svg>
\ No newline at end of file |