From 4fcdeafdff1241ff598b7695283f3c44680888df 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, 16 Mar 2023 22:29:30 +0800 Subject: Bootstrap button primary impl & its use in SignIn --- imports/Bootstrap/Bootstrap.qml | 24 ++++++++++++++++++++++++ imports/Bootstrap/qmldir | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 imports/Bootstrap/Bootstrap.qml create mode 100644 imports/Bootstrap/qmldir (limited to 'imports/Bootstrap') diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml new file mode 100644 index 0000000..321eedf --- /dev/null +++ b/imports/Bootstrap/Bootstrap.qml @@ -0,0 +1,24 @@ +pragma Singleton + +import QtQuick 2.15 + +QtObject { + readonly property color btnColor: "#ffffff" + readonly property color btnBg: "#066ac9" + readonly property color btnActiveBg: "#0555a1" + readonly property color btnDisabledBg: "#a6066ac9" + + readonly property bool haveRoboto: Qt.platform.os === "android" + || Qt.platform.os === "linux" + || Qt.platform.os === "osx" + || Qt.platform.os === "unix" + || Qt.platform.os === "windows" + readonly property FontLoader medium: FontLoader { + source: haveRoboto ? "" : "../../Roboto/Roboto-Medium.ttf" + } + readonly property font btnFont: Qt.font({ + pointSize: 15, + family: haveRoboto ? "Roboto" : medium.name, + weight: Font.Medium + }) +} diff --git a/imports/Bootstrap/qmldir b/imports/Bootstrap/qmldir new file mode 100644 index 0000000..53e8824 --- /dev/null +++ b/imports/Bootstrap/qmldir @@ -0,0 +1,2 @@ +module Bootstrap +singleton Bootstrap 5.3 Bootstrap.qml -- cgit v1.2.3