diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-28 18:34:43 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-28 18:34:43 +0800 |
commit | b81852f3c4d35cb2aa851ae3cac17a1061470961 (patch) | |
tree | f5ac9ffb26f2014bdfd1c7ac2fa97598c4d7bd9d /Button | |
parent | 0b5e8d11af518394e5858321262e2f00ec8d78d5 (diff) |
Mode button icons show up now
Diffstat (limited to 'Button')
-rw-r--r-- | Button/Sm.ui.qml | 30 |
1 files changed, 24 insertions, 6 deletions
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 |