summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Button/Sm.ui.qml30
-rw-r--r--Header.ui.qml6
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"