summaryrefslogtreecommitdiff
path: root/Button/Btn.ui.qml
diff options
context:
space:
mode:
Diffstat (limited to 'Button/Btn.ui.qml')
-rw-r--r--Button/Btn.ui.qml23
1 files changed, 20 insertions, 3 deletions
diff --git a/Button/Btn.ui.qml b/Button/Btn.ui.qml
index cf5c731..1d58fe8 100644
--- a/Button/Btn.ui.qml
+++ b/Button/Btn.ui.qml
@@ -3,6 +3,15 @@ import QtQuick.Controls 2.15
import Eduport 1.4
Button {
+ property color bsBtnColor: Eduport.bsBtnColor
+ property color bsBtnBg: Eduport.bsBtnBg
+ property color bsBtnBorderColor: Eduport.bsBtnBorderColor
+ property color bsBtnActiveColor: Eduport.bsBtnColor
+ property color bsBtnActiveBg: Eduport.bsBtnBg
+ property color bsBtnActiveBorderColor: Eduport.bsBtnBorderColor
+ property color bsBtnDisabledColor: Eduport.bsBtnColor
+ property color bsBtnDisabledBg: Eduport.bsBtnBg
+ property color bsBtnDisabledBorderColor: Eduport.bsBtnBorderColor
id: button
horizontalPadding: Eduport.bsBtnPaddingX
verticalPadding: Eduport.bsBtnPaddingY
@@ -10,15 +19,23 @@ Button {
contentItem: Text {
text: button.text
font: button.font
- color: Eduport.bsBtnPrimaryColor
+ color: button.down
+ ? bsBtnActiveColor
+ : button.enabled
+ ? bsBtnColor
+ : bsBtnDisabledColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
- color: Eduport.bsBtnBg
+ color: button.down
+ ? bsBtnActiveBg
+ : button.enabled
+ ? bsBtnBg
+ : bsBtnDisabledBg
border {
width: Eduport.bsBtnBorderWidth
- color: Eduport.bsBtnBorderColor
+ color: bsBtnBorderColor
}
radius: Eduport.bsBtnBorderRadius
}