From b3d2b1fc6251d2a75a45ef88477cbf6ed5aa9eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 23 Mar 2023 12:14:59 +0800 Subject: Implementation of .btn & primary reuses it --- imports/Bootstrap/Bootstrap.qml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'imports') diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml index 57051ba..31c6aa3 100644 --- a/imports/Bootstrap/Bootstrap.qml +++ b/imports/Bootstrap/Bootstrap.qml @@ -4,13 +4,30 @@ import QtQuick 2.15 QtObject { readonly property real badgeFontSize: 13.6 + readonly property real btnPaddingX: 16 + readonly property real btnPaddingY: 8 + readonly property font btnFont: Qt.font({ + family: haveRoboto ? "Roboto" : medium.name, + weight: Font.Medium, + pointSize: 15 + }) 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 color btnBg: "transparent" + readonly property real btnBorderWidth: 1 + readonly property color btnBorderColor: "transparent" + readonly property real btnBorderRadius: 5.2 + readonly property color btnPrimaryBg: "#066ac9" + readonly property color btnPrimaryBorderColor: "#066ac9" + readonly property color btnPrimaryActiveBg: "#0555a1" + readonly property color btnPrimaryActiveBorderColor: "#055097" + readonly property color btnPrimaryDisabledBg: "#a6066ac9" + readonly property color btnPrimaryDisabledBorderColor: "#a6066ac9" + + readonly property font bodyFont: Qt.font({ + family: haveRoboto ? "Roboto" : regular.name, + weight: Font.Normal, + pointSize: 15 + }) readonly property bool haveRoboto: Qt.platform.os === "android" || Qt.platform.os === "linux" @@ -23,14 +40,4 @@ QtObject { readonly property FontLoader regular: FontLoader { source: haveRoboto ? "" : "../../Roboto/Roboto-Regular.ttf" } - readonly property font bodyFont: Qt.font({ - family: haveRoboto ? "Roboto" : regular.name, - weight: Font.Normal, - pointSize: 15 - }) - readonly property font btnFont: Qt.font({ - family: haveRoboto ? "Roboto" : medium.name, - weight: Font.Medium, - pointSize: 15 - }) } -- cgit v1.2.3