mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 06:12:21 +02:00
use a monospace font on all platforms
This commit is contained in:
parent
1705eb8f80
commit
7bbaf026f3
3 changed files with 11 additions and 3 deletions
|
@ -239,8 +239,8 @@ Hifi.Stats {
|
|||
x: 4; y: 4
|
||||
id: perfText
|
||||
color: root.fontColor
|
||||
font.family: "Lucida Console"
|
||||
text: "-------------------------------------------------------- Function " +
|
||||
font.family: root.monospaceFont
|
||||
text: "-------------------------------------------------------- Function " +
|
||||
"------------------------------------------------------- --msecs- -calls--\n" +
|
||||
root.timingStats;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "Stats.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <QFontDatabase>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/component_wise.hpp>
|
||||
|
@ -50,6 +51,8 @@ Stats* Stats::getInstance() {
|
|||
|
||||
Stats::Stats(QQuickItem* parent) : QQuickItem(parent) {
|
||||
INSTANCE = this;
|
||||
const QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
_monospaceFont = font.family();
|
||||
}
|
||||
|
||||
bool Stats::includeTimingRecord(const QString& name) {
|
||||
|
|
|
@ -32,6 +32,8 @@ class Stats : public QQuickItem {
|
|||
HIFI_QML_DECL
|
||||
Q_PROPERTY(bool expanded READ isExpanded WRITE setExpanded NOTIFY expandedChanged)
|
||||
Q_PROPERTY(bool timingExpanded READ isTimingExpanded NOTIFY timingExpandedChanged)
|
||||
Q_PROPERTY(QString monospaceFont READ monospaceFont)
|
||||
|
||||
STATS_PROPERTY(int, serverCount, 0)
|
||||
STATS_PROPERTY(int, framerate, 0)
|
||||
STATS_PROPERTY(int, avatarCount, 0)
|
||||
|
@ -79,7 +81,9 @@ public:
|
|||
Stats(QQuickItem* parent = nullptr);
|
||||
bool includeTimingRecord(const QString& name);
|
||||
void setRenderDetails(const RenderDetails& details);
|
||||
|
||||
const QString& monospaceFont() {
|
||||
return _monospaceFont;
|
||||
}
|
||||
void updateStats();
|
||||
|
||||
bool isExpanded() { return _expanded; }
|
||||
|
@ -141,6 +145,7 @@ private:
|
|||
bool _resetRecentMaxPacketsSoon{ true };
|
||||
bool _expanded{ false };
|
||||
bool _timingExpanded{ false };
|
||||
QString _monospaceFont;
|
||||
};
|
||||
|
||||
#endif // hifi_Stats_h
|
||||
|
|
Loading…
Reference in a new issue