diff options
Diffstat (limited to 'Button/Sm.ui.qml')
-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 |