diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-04-11 16:07:10 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-04-11 16:07:10 +0800 |
commit | 6f46e95ed7e02bc16aaf26393942383ce8667e13 (patch) | |
tree | 3cf8f401e3ae9d0cffda3a09ee0f6a4a3905eca2 | |
parent | e47f0a86a8f7960d608945861aba1c522ba31eda (diff) |
Qeduport now relies on Qootstrap
Qeduport should now be installed to the system too.
When used from app, Qeduport will refer to libqootstrap installed
in the system.
When used from Designer / Design Studio, Qeduport will refer to
the non attached property QML version instead.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Course/Detail/Classic/Content/Main/TabContents/Instructor.ui.qml | 5 | ||||
-rw-r--r-- | Eduport.pro | 17 | ||||
-rw-r--r-- | Eduport.qrc | 5 | ||||
-rw-r--r-- | Header.ui.qml | 10 | ||||
-rw-r--r-- | Roboto.qrc | 7 | ||||
-rw-r--r-- | imports/Bootstrap/Bootstrap.qml | 14 | ||||
-rw-r--r-- | imports/Bootstrap/qmldir | 2 | ||||
-rw-r--r-- | imports/Eduport/Eduport.qml | 27 | ||||
-rw-r--r-- | imports/Eduport/Heebo-Bold.ttf (renamed from Heebo/Heebo-Bold.ttf) | bin | 33324 -> 33324 bytes | |||
-rw-r--r-- | imports/Eduport/Heebo-Medium.ttf (renamed from Heebo/Heebo-Medium.ttf) | bin | 33228 -> 33228 bytes | |||
-rw-r--r-- | imports/Eduport/Heebo-Regular.ttf (renamed from Heebo/Heebo-Regular.ttf) | bin | 33040 -> 33040 bytes | |||
-rw-r--r-- | imports/Eduport/Heebo.txt (renamed from Heebo/OFL.txt) | 0 | ||||
-rw-r--r-- | imports/Eduport/Roboto-Bold.ttf (renamed from Roboto/Roboto-Bold.ttf) | bin | 167336 -> 167336 bytes | |||
-rw-r--r-- | imports/Eduport/Roboto-Medium.ttf (renamed from Roboto/Roboto-Medium.ttf) | bin | 168644 -> 168644 bytes | |||
-rw-r--r-- | imports/Eduport/Roboto-Regular.ttf (renamed from Roboto/Roboto-Regular.ttf) | bin | 168260 -> 168260 bytes | |||
-rw-r--r-- | imports/Eduport/Roboto.txt (renamed from Roboto/LICENSE.txt) | 0 |
17 files changed, 54 insertions, 36 deletions
@@ -1,3 +1,4 @@ -.DS_Store *.qtds *.swp +.DS_Store +build diff --git a/Course/Detail/Classic/Content/Main/TabContents/Instructor.ui.qml b/Course/Detail/Classic/Content/Main/TabContents/Instructor.ui.qml index fb7687f..931e439 100644 --- a/Course/Detail/Classic/Content/Main/TabContents/Instructor.ui.qml +++ b/Course/Detail/Classic/Content/Main/TabContents/Instructor.ui.qml @@ -6,11 +6,6 @@ import "Instructor" ColumnLayout { - FontLoader { - id: heebo - source: "../../../../../../Heebo/Heebo-Bold.ttf" - } - GridLayout { rows: width < 671.612 ? 2 : 1 columns: width < 671.612 ? 1 : 2 diff --git a/Eduport.pro b/Eduport.pro new file mode 100644 index 0000000..838b998 --- /dev/null +++ b/Eduport.pro @@ -0,0 +1,17 @@ +TEMPLATE = aux + +import.files = \ + imports/$$TARGET/qmldir \ + imports/$$TARGET/$${TARGET}.qml \ + imports/$$TARGET/Heebo-Bold.ttf \ + imports/$$TARGET/Heebo-Medium.ttf \ + imports/$$TARGET/Heebo-Regular.ttf \ + imports/$$TARGET/Heebo.txt +ios|wasm: import.files += \ + imports/$$TARGET/Roboto-Regular.ttf \ + imports/$$TARGET/Roboto-Medium.ttf \ + imports/$$TARGET/Roboto-Bold.ttf \ + imports/$$TARGET/Roboto.txt +import.path = $$[QT_INSTALL_QML]/$$TARGET + +INSTALLS += import diff --git a/Eduport.qrc b/Eduport.qrc index 70ba3ed..789318c 100644 --- a/Eduport.qrc +++ b/Eduport.qrc @@ -1,10 +1,5 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="qeduport"> - <file>Heebo/Heebo-Bold.ttf</file> - <file>Heebo/Heebo-Medium.ttf</file> - <file>Heebo/Heebo-Regular.ttf</file> - <file>imports/Eduport/Eduport.qml</file> - <file>imports/Eduport/qmldir</file> <file>Bootstrap/icons/person.svg</file> <file>Bootstrap/icons/gear.svg</file> <file>Bootstrap/icons/info-circle.svg</file> diff --git a/Header.ui.qml b/Header.ui.qml index 3262240..8d4b506 100644 --- a/Header.ui.qml +++ b/Header.ui.qml @@ -2,6 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import QtGraphicalEffects 1.15 +import Bootstrap 5.3 import Eduport 1.4 import "DropShadow" as DrpShdw import "Button" as Btn @@ -300,7 +301,8 @@ ToolBar { } Loader { - property string imageSource: profileImageSource + property string imageSource: + profileImageSource property int imageWidth: 48 property int imageHeight: 48 property real maskRadius: 48 @@ -391,7 +393,8 @@ ToolBar { } text: qsTr("Light") checked: Eduport.mode - == Eduport.Mode + == Bootstrap + .Mode .Light enabled: !checked Layout.fillWidth: true @@ -406,7 +409,8 @@ ToolBar { } text: qsTr("Dark") checked: Eduport.mode - == Eduport.Mode + == Bootstrap + .Mode .Dark enabled: !checked Layout.fillWidth: true diff --git a/Roboto.qrc b/Roboto.qrc deleted file mode 100644 index 6103215..0000000 --- a/Roboto.qrc +++ /dev/null @@ -1,7 +0,0 @@ -<RCC> - <qresource prefix="qeduport"> - <file>Roboto/Roboto-Regular.ttf</file> - <file>Roboto/Roboto-Medium.ttf</file> - <file>Roboto/Roboto-Bold.ttf</file> - </qresource> -</RCC> diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml new file mode 100644 index 0000000..d31cfb0 --- /dev/null +++ b/imports/Bootstrap/Bootstrap.qml @@ -0,0 +1,14 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + enum Mode { + Light, + Dark + } + property int mode: Bootstrap.Mode.Light + + 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/Bootstrap/qmldir b/imports/Bootstrap/qmldir new file mode 100644 index 0000000..8e5154b --- /dev/null +++ b/imports/Bootstrap/qmldir @@ -0,0 +1,2 @@ +module Eduport +singleton Bootstrap 5.3 Bootstrap.qml diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml index ba3f344..f5f4da8 100644 --- a/imports/Eduport/Eduport.qml +++ b/imports/Eduport/Eduport.qml @@ -1,12 +1,10 @@ pragma Singleton import QtQuick 2.15 +import Bootstrap 5.3 QtObject { - enum Mode { - Light, - Dark - } - property int mode: Eduport.Mode.Light + property int mode: Bootstrap.mode + onModeChanged: Bootstrap.mode = mode readonly property real leadFontSize: 18.75 readonly property real formControlFontSize: 16 @@ -44,10 +42,9 @@ QtObject { readonly property real bsBadgeFontSize: 13.6 - property color bsBodyColor: mode ? "#a1a1a8" : "#747579" - property color bsBodyBg: mode ? "#222529" : "#ffffff" - - property color bsBorderColor: mode ? "#12ffffff" : bsGray200 + property color bsBodyColor: Bootstrap.bodyColor + property color bsBodyBg: Bootstrap.bodyBg + property color bsBorderColor: Bootstrap.borderColor property real bsBorderRadius: 5.2 property real bsBoxShadowOffsetX: 0 @@ -145,21 +142,21 @@ QtObject { || Qt.platform.os === "unix" || Qt.platform.os === "windows" readonly property FontLoader robotoBold: FontLoader { - source: haveRoboto ? "" : "../../Roboto/Roboto-Bold.ttf" + source: haveRoboto ? "" : "Roboto-Bold.ttf" } readonly property FontLoader robotoMedium: FontLoader { - source: haveRoboto ? "" : "../../Roboto/Roboto-Medium.ttf" + source: haveRoboto ? "" : "Roboto-Medium.ttf" } readonly property FontLoader robotoRegular: FontLoader { - source: haveRoboto ? "" : "../../Roboto/Roboto-Regular.ttf" + source: haveRoboto ? "" : "Roboto-Regular.ttf" } readonly property FontLoader heeboBold: FontLoader { - source: "../../Heebo/Heebo-Bold.ttf" + source: "Heebo-Bold.ttf" } readonly property FontLoader heeboMedium: FontLoader { - source: "../../Heebo/Heebo-Medium.ttf" + source: "Heebo-Medium.ttf" } readonly property FontLoader heeboRegular: FontLoader { - source: "../../Heebo/Heebo-Regular.ttf" + source: "Heebo-Regular.ttf" } } diff --git a/Heebo/Heebo-Bold.ttf b/imports/Eduport/Heebo-Bold.ttf Binary files differindex efe9761..efe9761 100644 --- a/Heebo/Heebo-Bold.ttf +++ b/imports/Eduport/Heebo-Bold.ttf diff --git a/Heebo/Heebo-Medium.ttf b/imports/Eduport/Heebo-Medium.ttf Binary files differindex 3aa8dd0..3aa8dd0 100644 --- a/Heebo/Heebo-Medium.ttf +++ b/imports/Eduport/Heebo-Medium.ttf diff --git a/Heebo/Heebo-Regular.ttf b/imports/Eduport/Heebo-Regular.ttf Binary files differindex d4ec6f9..d4ec6f9 100644 --- a/Heebo/Heebo-Regular.ttf +++ b/imports/Eduport/Heebo-Regular.ttf diff --git a/Heebo/OFL.txt b/imports/Eduport/Heebo.txt index c58fc46..c58fc46 100644 --- a/Heebo/OFL.txt +++ b/imports/Eduport/Heebo.txt diff --git a/Roboto/Roboto-Bold.ttf b/imports/Eduport/Roboto-Bold.ttf Binary files differindex 43da14d..43da14d 100644 --- a/Roboto/Roboto-Bold.ttf +++ b/imports/Eduport/Roboto-Bold.ttf diff --git a/Roboto/Roboto-Medium.ttf b/imports/Eduport/Roboto-Medium.ttf Binary files differindex ac0f908..ac0f908 100644 --- a/Roboto/Roboto-Medium.ttf +++ b/imports/Eduport/Roboto-Medium.ttf diff --git a/Roboto/Roboto-Regular.ttf b/imports/Eduport/Roboto-Regular.ttf Binary files differindex ddf4bfa..ddf4bfa 100644 --- a/Roboto/Roboto-Regular.ttf +++ b/imports/Eduport/Roboto-Regular.ttf diff --git a/Roboto/LICENSE.txt b/imports/Eduport/Roboto.txt index 75b5248..75b5248 100644 --- a/Roboto/LICENSE.txt +++ b/imports/Eduport/Roboto.txt |