From 57974508d3466c7bcc952187a58b92a00c699110 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sun, 7 Jan 2018 20:54:44 +0100 Subject: [PATCH] set default fonts for macos and windows --- src/singletons/fontmanager.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/singletons/fontmanager.cpp b/src/singletons/fontmanager.cpp index 3242acd6e..8522363c8 100644 --- a/src/singletons/fontmanager.cpp +++ b/src/singletons/fontmanager.cpp @@ -1,13 +1,25 @@ #include "singletons/fontmanager.hpp" #include +#include + +#ifdef Q_OS_WIN32 +#define DEFAULT_FONT_FAMILY "Segoe UI" +#define DEFAULT_FONT_SIZE 10 +#elif Q_OS_MACOS +#define DEFAULT_FONT_FAMILY "Helvetica Neue" +#define DEFAULT_FONT_SIZE 12 +#else +#define DEFAULT_FONT_FAMILY "Arial" +#define DEFAULT_FONT_SIZE 11 +#endif namespace chatterino { namespace singletons { FontManager::FontManager() - : currentFontFamily("/appearance/currentFontFamily", "Arial") - , currentFontSize("/appearance/currentFontSize", 12) + : currentFontFamily("/appearance/currentFontFamily", DEFAULT_FONT_FAMILY) + , currentFontSize("/appearance/currentFontSize", DEFAULT_FONT_SIZE) // , currentFont(this->currentFontFamily.getValue().c_str(), currentFontSize.getValue()) { this->currentFontFamily.connect([this](const std::string &newValue, auto) {