Commit 168bc8ec authored by Gus Grubba's avatar Gus Grubba

Handle fonts

parent 0e4d256c
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <QAction> #include <QAction>
#include <QStringListModel> #include <QStringListModel>
#include <QRegularExpression> #include <QRegularExpression>
#include <QFontDatabase>
#ifdef QGC_ENABLE_BLUETOOTH #ifdef QGC_ENABLE_BLUETOOTH
#include <QBluetoothLocalDevice> #include <QBluetoothLocalDevice>
...@@ -466,6 +467,13 @@ void QGCApplication::_initCommon() ...@@ -466,6 +467,13 @@ void QGCApplication::_initCommon()
bool QGCApplication::_initForNormalAppBoot() bool QGCApplication::_initForNormalAppBoot()
{ {
if(QFontDatabase::addApplicationFont(":/fonts/opensans") < 0) {
qWarning() << "Could not load /fonts/opensans font";
}
if(QFontDatabase::addApplicationFont(":/fonts/opensans-demibold") < 0) {
qWarning() << "Could not load /fonts/opensans-demibold font";
}
QSettings settings; QSettings settings;
// Exit main application when last window is closed // Exit main application when last window is closed
......
...@@ -98,7 +98,7 @@ Item { ...@@ -98,7 +98,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: !communicationLost visible: activeVehicle && !communicationLost
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: _outdoorPalette ? _brandImageOutdoor : _brandImageIndoor source: _outdoorPalette ? _brandImageOutdoor : _brandImageIndoor
mipmap: true mipmap: true
...@@ -133,7 +133,7 @@ Item { ...@@ -133,7 +133,7 @@ Item {
anchors.fill: parent anchors.fill: parent
layoutDirection: Qt.RightToLeft layoutDirection: Qt.RightToLeft
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
visible: communicationLost visible: activeVehicle && communicationLost
QGCButton { QGCButton {
id: disconnectButton id: disconnectButton
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment