From b81852f3c4d35cb2aa851ae3cac17a1061470961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 28 Mar 2023 18:34:43 +0800 Subject: Mode button icons show up now --- Button/Sm.ui.qml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'Button') diff --git a/Button/Sm.ui.qml b/Button/Sm.ui.qml index b4c5985..909d9c3 100644 --- a/Button/Sm.ui.qml +++ b/Button/Sm.ui.qml @@ -1,5 +1,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtGraphicalEffects 1.15 import Eduport 1.4 Button { @@ -12,12 +14,28 @@ Button { weight: Font.Medium pointSize: 13 } - contentItem: Text { - text: button.text - font: button.font - color: checked ? Eduport.bsGray800 : Eduport.bsBtnColor - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter + contentItem: RowLayout { + + Image { + source: button.icon.source + sourceSize { + width: button.icon.width + height: button.icon.height + } + ColorOverlay { + color: button.icon.color + source: parent + anchors.fill: parent + } + } + + Text { + text: button.text + font: button.font + color: checked ? Eduport.bsGray800 : Eduport.bsBtnColor + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } } background: Rectangle { color: checked ? Eduport.bsBodyBg : Eduport.bsBtnBg -- cgit v1.2.3