summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-23 11:48:08 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-23 11:48:08 +0800
commit28a59a4223ab1fb9f7c80b5673064d0f7e196624 (patch)
tree10860fba12bea2b9e1d761ffed0f65b3b59904bb
parent19addbe4f8a83b7255d8a18840baf6bf5214b420 (diff)
Fix primary button
Fix the radius Customise border Add paddings from .btn
-rw-r--r--Button/Primary.ui.qml10
-rw-r--r--imports/Bootstrap/Bootstrap.qml3
2 files changed, 12 insertions, 1 deletions
diff --git a/Button/Primary.ui.qml b/Button/Primary.ui.qml
index e99f56b..831430a 100644
--- a/Button/Primary.ui.qml
+++ b/Button/Primary.ui.qml
@@ -4,6 +4,8 @@ import Bootstrap 5.3
Button {
id: button
+ horizontalPadding: 16
+ verticalPadding: 8
font: Bootstrap.btnFont
contentItem: Text {
text: button.text
@@ -15,6 +17,12 @@ Button {
background: Rectangle {
color: button.down ? Bootstrap.btnActiveBG : button.enabled
? Bootstrap.btnBg : Bootstrap.btnDisabledBg
- radius: 8
+ border {
+ color: button.down ? Bootstrap.btnActiveBorderColor
+ : button.enabled ? Bootstrap.btnBorderColor
+ : Bootstrap.btnDisabledBorderColor
+ width: 1
+ }
+ radius: 5.2
}
}
diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml
index a7a2951..57051ba 100644
--- a/imports/Bootstrap/Bootstrap.qml
+++ b/imports/Bootstrap/Bootstrap.qml
@@ -6,8 +6,11 @@ QtObject {
readonly property color btnColor: "#ffffff"
readonly property color btnBg: "#066ac9"
+ readonly property color btnBorderColor: "#066ac9"
readonly property color btnActiveBg: "#0555a1"
+ readonly property color btnActiveBorderColor: "#055097"
readonly property color btnDisabledBg: "#a6066ac9"
+ readonly property color btnDisabledBorderColor: "#a6066ac9"
readonly property bool haveRoboto: Qt.platform.os === "android"
|| Qt.platform.os === "linux"