diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-12 16:22:39 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-12 16:22:39 +0800 |
commit | 5066bc33212ec0e4967ab765d1e500f165bdefca (patch) | |
tree | d6e59c59bbcb2671d8c3f5cbbd438af5e29384da | |
parent | 204554e2a245ff88a07d83c70737f08457d7ec7f (diff) |
Roboto Medium for header tool bar menu items
Dark mode will be in a separated section.
-rw-r--r-- | HeaderToolBar.qml | 25 | ||||
-rw-r--r-- | Roboto.qrc | 1 | ||||
-rw-r--r-- | Roboto/Roboto-Medium.ttf | bin | 0 -> 168644 bytes |
3 files changed, 24 insertions, 2 deletions
diff --git a/HeaderToolBar.qml b/HeaderToolBar.qml index 9ba0bfe..f020a96 100644 --- a/HeaderToolBar.qml +++ b/HeaderToolBar.qml @@ -3,6 +3,12 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 ToolBar { + FontLoader { + id: roboto + name: "Roboto" + source: "Roboto/Roboto-Medium.ttf" + } + RowLayout { anchors.fill: parent layoutDirection: Qt.RightToLeft @@ -25,8 +31,23 @@ ToolBar { Action { text: qsTr("Sign Out") } - Action { - text: qsTr("Dark Mode") + delegate: MenuItem { + font { + family: Qt.platform.os + == "android" + || Qt.platform.os + == "linux" + || Qt.platform.os + == "osx" + || Qt.platform.os + == "unix" + || Qt.platform.os + == "windows" + ? "Roboto" + : roboto.name + pixelSize: 15 + weight: Font.Medium + } } } } @@ -1,5 +1,6 @@ <RCC> <qresource prefix="qeduport"> <file>Roboto/Roboto-Regular.ttf</file> + <file>Roboto/Roboto-Medium.ttf</file> </qresource> </RCC> diff --git a/Roboto/Roboto-Medium.ttf b/Roboto/Roboto-Medium.ttf Binary files differnew file mode 100644 index 0000000..ac0f908 --- /dev/null +++ b/Roboto/Roboto-Medium.ttf |