diff options
-rw-r--r-- | GridCardItem.ui.qml | 19 | ||||
-rw-r--r-- | HeaderToolBar.qml | 20 |
2 files changed, 16 insertions, 23 deletions
diff --git a/GridCardItem.ui.qml b/GridCardItem.ui.qml index 346b3c6..2bfa20d 100644 --- a/GridCardItem.ui.qml +++ b/GridCardItem.ui.qml @@ -17,6 +17,11 @@ Item { property alias imageArea: imageArea property alias titleArea: titleArea // property string textTruncateText: "Rooms oh fully taken by worse do. Points afraid but may end afraid but.." + property bool doesntEmbed: Qt.platform.os == "android" + || Qt.platform.os == "linux" + || Qt.platform.os == "osx" + || Qt.platform.os == "unix" + || Qt.platform.os == "windows" DropShadow { source: rectangle @@ -94,7 +99,8 @@ Item { FontLoader { id: roboto name: "Roboto" - source: "Roboto/Roboto-Regular.ttf" + source: doesntEmbed ? "" + : "Roboto/Roboto-Regular.ttf" } Label { @@ -102,16 +108,7 @@ Item { text: badgeText color: badgeColor font { - family: Qt.platform.os - == "android" || - Qt.platform.os - == "linux" || - Qt.platform.os - == "osx" || - Qt.platform.os - == "unix" || - Qt.platform.os - == "windows" + family: doesntEmbed ? "Roboto" : roboto.name pixelSize: 13 diff --git a/HeaderToolBar.qml b/HeaderToolBar.qml index f020a96..174668e 100644 --- a/HeaderToolBar.qml +++ b/HeaderToolBar.qml @@ -3,10 +3,16 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 ToolBar { + property bool doesntEmbed: Qt.platform.os == "android" + || Qt.platform.os == "linux" + || Qt.platform.os == "osx" + || Qt.platform.os == "unix" + || Qt.platform.os == "windows" + FontLoader { id: roboto name: "Roboto" - source: "Roboto/Roboto-Medium.ttf" + source: doesntEmbed ? "" : "Roboto/Roboto-Medium.ttf" } RowLayout { @@ -33,17 +39,7 @@ ToolBar { } 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" + family: doesntEmbed ? "Roboto" : roboto.name pixelSize: 15 weight: Font.Medium |