From 34f1bbf1fad2eecd7f9844f76f1bc073cc34a581 Mon Sep 17 00:00:00 2001
From: Thanos Doukoudakis <thanos.doukoudakis@isode.com>
Date: Wed, 3 May 2017 13:28:44 +0100
Subject: Change the default font size in chat view

This will make the default font size in chat view to match the one in
roster.
This fix also decreases the font scaling step to half, and lowers the
minimum font scale.

Test-Information:

Tested and verified the changes to Windows with Qt5.7.

Change-Id: If5873049af4e82fba871e5d2687575aa88b533c9

diff --git a/Swift/QtUI/QtUISettingConstants.cpp b/Swift/QtUI/QtUISettingConstants.cpp
index 2b8edc2..b4b9780 100644
--- a/Swift/QtUI/QtUISettingConstants.cpp
+++ b/Swift/QtUI/QtUISettingConstants.cpp
@@ -14,7 +14,7 @@ const SettingsProvider::Setting<bool> QtUISettingConstants::COMPACT_ROSTER("comp
 const SettingsProvider::Setting<std::string> QtUISettingConstants::CLICKTHROUGH_BANNER("clickthroughBanner", "");
 const SettingsProvider::Setting<int> QtUISettingConstants::CURRENT_ROSTER_TAB("currentRosterTab", 0);
 const SettingsProvider::Setting<bool> QtUISettingConstants::SHOW_NICK_IN_ROSTER_HEADER("showNickInRosterHeader", true);
-const SettingsProvider::Setting<int> QtUISettingConstants::CHATWINDOW_FONT_SIZE("chatWindowFontSize_V2", 2);
+const SettingsProvider::Setting<int> QtUISettingConstants::CHATWINDOW_FONT_SIZE("chatWindowFontSize_V2", 3);
 const SettingsProvider::Setting<int> QtUISettingConstants::HISTORYWINDOW_FONT_SIZE("historyWindowFontSize", 0);
 const SettingsProvider::Setting<bool> QtUISettingConstants::SHOW_EMOTICONS("showEmoticons", true);
 const SettingsProvider::Setting<bool> QtUISettingConstants::USE_PLAIN_CHATS("plainChats", false);
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index bca80f3..ea9a9c6 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -53,7 +53,7 @@ const QString QtWebKitChatView::ButtonFileTransferOpenFile = QString("filetransf
 const QString QtWebKitChatView::ButtonMUCInvite = QString("mucinvite");
 
 namespace {
-    const double minimalFontScaling = 0.8;
+    const double minimalFontScaling = 0.7;
 }
 
 QtWebKitChatView::QtWebKitChatView(QtChatWindow* window, UIEventStream* eventStream, QtChatTheme* theme, QWidget* parent, bool disableAutoScroll) : QtChatView(parent), window_(window), eventStream_(eventStream), fontSizeSteps_(0), disableAutoScroll_(disableAutoScroll), previousMessageKind_(PreviosuMessageWasNone), previousMessageWasSelf_(false), showEmoticons_(false), insertingLastLine_(false), idCounter_(0) {
@@ -309,7 +309,7 @@ void QtWebKitChatView::decreaseFontSize() {
 
 void QtWebKitChatView::resizeFont(int fontSizeSteps) {
     fontSizeSteps_ = fontSizeSteps;
-    double size = minimalFontScaling + 0.2 * fontSizeSteps_;
+    double size = minimalFontScaling + 0.1 * fontSizeSteps_;
     QString sizeString(QString().setNum(size, 'g', 3) + "em");
 
     // Set the font size in the <style id="text-resize-style"> element in the theme <head> element.
-- 
cgit v0.10.2-6-g49f6