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 | |
parent | 0b5e8d11af518394e5858321262e2f00ec8d78d5 (diff) |
Mode button icons show up now
-rw-r--r-- | Button/Sm.ui.qml | 30 | ||||
-rw-r--r-- | Header.ui.qml | 6 |
2 files changed, 24 insertions, 12 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 diff --git a/Header.ui.qml b/Header.ui.qml index bd36d9f..491965f 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -201,9 +201,6 @@ ToolBar { Btn.Sm { id: light - display: - AbstractButton. - TextBesideIcon icon { source: "Bootstrap/icons/sun.svg" @@ -233,9 +230,6 @@ ToolBar { Btn.Sm { id: dark - display: - AbstractButton. - TextBesideIcon icon { source: "Bootstrap/icons/moon-stars.svg" |