refactor: Fonts (#5228)

This commit is contained in:
pajlada
2024-03-10 14:27:08 +01:00
committed by GitHub
parent e56f7136a9
commit e7508332ff
16 changed files with 128 additions and 143 deletions
+21
View File
@@ -25,6 +25,19 @@ using TimeoutButton = std::pair<QString, int>;
namespace chatterino {
#ifdef Q_OS_WIN32
# define DEFAULT_FONT_FAMILY "Segoe UI"
# define DEFAULT_FONT_SIZE 10
#else
# ifdef 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
#endif
void _actuallyRegisterSetting(
std::weak_ptr<pajlada::Settings::SettingData> setting);
@@ -134,6 +147,14 @@ public:
// BoolSetting collapseLongMessages =
// {"/appearance/messages/collapseLongMessages", false};
QStringSetting chatFontFamily{
"/appearance/currentFontFamily",
DEFAULT_FONT_FAMILY,
};
IntSetting chatFontSize{
"/appearance/currentFontSize",
DEFAULT_FONT_SIZE,
};
BoolSetting hideReplyContext = {"/appearance/hideReplyContext", false};
BoolSetting showReplyButton = {"/appearance/showReplyButton", false};
BoolSetting stripReplyMention = {"/appearance/stripReplyMention", true};