set default fonts for macos and windows
This commit is contained in:
@@ -1,13 +1,25 @@
|
|||||||
#include "singletons/fontmanager.hpp"
|
#include "singletons/fontmanager.hpp"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#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 chatterino {
|
||||||
namespace singletons {
|
namespace singletons {
|
||||||
|
|
||||||
FontManager::FontManager()
|
FontManager::FontManager()
|
||||||
: currentFontFamily("/appearance/currentFontFamily", "Arial")
|
: currentFontFamily("/appearance/currentFontFamily", DEFAULT_FONT_FAMILY)
|
||||||
, currentFontSize("/appearance/currentFontSize", 12)
|
, currentFontSize("/appearance/currentFontSize", DEFAULT_FONT_SIZE)
|
||||||
// , currentFont(this->currentFontFamily.getValue().c_str(), currentFontSize.getValue())
|
// , currentFont(this->currentFontFamily.getValue().c_str(), currentFontSize.getValue())
|
||||||
{
|
{
|
||||||
this->currentFontFamily.connect([this](const std::string &newValue, auto) {
|
this->currentFontFamily.connect([this](const std::string &newValue, auto) {
|
||||||
|
|||||||
Reference in New Issue
Block a user