summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-12 17:30:11 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-12 17:30:11 +0800
commit89fcfe5ec1073fd374a8bae3d8457bebd96453c8 (patch)
tree757d449fff6d5f65c5faf7d3ad16ca5f5f0d87e9
parentab4d14d706f98907a1ae3929a94ac418f8a20c25 (diff)
BS body font can be set & used instead
-rw-r--r--Label/Body.ui.qml5
-rw-r--r--imports/Bootstrap/Bootstrap.qml5
-rw-r--r--imports/Eduport/Eduport.qml19
-rw-r--r--qtquickcontrols2.conf2
4 files changed, 18 insertions, 13 deletions
diff --git a/Label/Body.ui.qml b/Label/Body.ui.qml
index 31ab7f9..b556097 100644
--- a/Label/Body.ui.qml
+++ b/Label/Body.ui.qml
@@ -3,10 +3,5 @@ import QtQuick.Controls 2.15
import Eduport 1.4
Label {
- font {
- family: Eduport.bodyFont.family
- weight: Eduport.bodyFont.weight
- pointSize: Eduport.bodyFont.pointSize
- }
wrapMode: Label.Wrap
}
diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml
index d31cfb0..8606851 100644
--- a/imports/Bootstrap/Bootstrap.qml
+++ b/imports/Bootstrap/Bootstrap.qml
@@ -8,6 +8,11 @@ QtObject {
}
property int mode: Bootstrap.Mode.Light
+ property font bodyFont: Qt.font({
+ family: "Roboto",
+ pointSize: 15.0,
+ weight: Font.Normal
+ })
readonly property color bodyColor: mode ? "#a1a1a8" : "#747579"
readonly property color bodyBg: mode ? "#222529" : "#fff"
readonly property color borderColor: mode ? "#12ffffff" : "#eff1f2"
diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml
index f5f4da8..be41156 100644
--- a/imports/Eduport/Eduport.qml
+++ b/imports/Eduport/Eduport.qml
@@ -6,6 +6,17 @@ QtObject {
property int mode: Bootstrap.mode
onModeChanged: Bootstrap.mode = mode
+ property font bodyFont: Qt.font({
+ family: Bootstrap.bodyFont.family === "Roboto"
+ ? (haveRoboto ? "Roboto" : robotoRegular.name)
+ : Bootstrap.bodyFont.family,
+ pointSize: Bootstrap.bodyFont.pointSize,
+ weight: Bootstrap.bodyFont.weight
+ })
+ property color bsBodyColor: Bootstrap.bodyColor
+ property color bsBodyBg: Bootstrap.bodyBg
+ property color bsBorderColor: Bootstrap.borderColor
+
readonly property real leadFontSize: 18.75
readonly property real formControlFontSize: 16
readonly property real h6FontSize: 15
@@ -19,11 +30,6 @@ QtObject {
family: haveRoboto ? "Roboto" : robotoBold.name,
weight: Font.Bold
})
- readonly property font bodyFont: Qt.font({
- family: haveRoboto ? "Roboto" : robotoRegular.name,
- weight: Font.Normal,
- pointSize: 15
- })
readonly property font hxFont: Qt.font({
family: heeboBold.name,
weight: Font.Bold,
@@ -42,9 +48,6 @@ QtObject {
readonly property real bsBadgeFontSize: 13.6
- property color bsBodyColor: Bootstrap.bodyColor
- property color bsBodyBg: Bootstrap.bodyBg
- property color bsBorderColor: Bootstrap.borderColor
property real bsBorderRadius: 5.2
property real bsBoxShadowOffsetX: 0
diff --git a/qtquickcontrols2.conf b/qtquickcontrols2.conf
index e46b820..f7980b7 100644
--- a/qtquickcontrols2.conf
+++ b/qtquickcontrols2.conf
@@ -2,6 +2,8 @@
Style = Bootstrap
[Bootstrap]
+BodyFontFamily = "Roboto"
+BodyFontSize = 15.0
BodyColors = ["#747579", "#a1a1a8"]
BodyBgs = ["#fff", "#222529"]
BorderColors = ["#eff1f2", "#12ffffff"]