From 5066bc33212ec0e4967ab765d1e500f165bdefca 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: Sun, 12 Feb 2023 16:22:39 +0800 Subject: Roboto Medium for header tool bar menu items Dark mode will be in a separated section. --- HeaderToolBar.qml | 25 +++++++++++++++++++++++-- Roboto.qrc | 1 + Roboto/Roboto-Medium.ttf | Bin 0 -> 168644 bytes 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Roboto/Roboto-Medium.ttf 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 + } } } } diff --git a/Roboto.qrc b/Roboto.qrc index f290e94..133f2df 100644 --- a/Roboto.qrc +++ b/Roboto.qrc @@ -1,5 +1,6 @@ Roboto/Roboto-Regular.ttf + Roboto/Roboto-Medium.ttf diff --git a/Roboto/Roboto-Medium.ttf b/Roboto/Roboto-Medium.ttf new file mode 100644 index 0000000..ac0f908 Binary files /dev/null and b/Roboto/Roboto-Medium.ttf differ -- cgit v1.2.3