From 7acefda94361f25d16a89909107baa67edf36b4a Mon Sep 17 00:00:00 2001 From: Phenom Date: Fri, 19 May 2017 18:40:17 +0200 Subject: [PATCH] Fix Chat Font setting saving. And don't use native dialog. --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 3 ++- retroshare-gui/src/gui/settings/ChatPage.cpp | 3 ++- retroshare-gui/src/gui/settings/ChatPage.ui | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index ead335091..9b659000b 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -1440,7 +1440,8 @@ void ChatWidget::colorChanged() void ChatWidget::chooseFont() { bool ok; - QFont font = QFontDialog::getFont(&ok, currentFont, this); + //Use NULL as parent as with this QFontDialog don't take care of title nether options. + QFont font = QFontDialog::getFont(&ok, currentFont, NULL, tr("Choose your font."),QFontDialog::DontUseNativeDialog); if (ok) { currentFont = font; setFont(); diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index 23669840e..81e54c802 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -416,7 +416,7 @@ ChatPage::load() void ChatPage::on_pushButtonChangeChatFont_clicked() { bool ok; - QFont font = QFontDialog::getFont(&ok, fontTempChat, this); + QFont font = QFontDialog::getFont(&ok, fontTempChat, this, tr("Choose your default font for Chat."),QFontDialog::DontUseNativeDialog); if (ok) { fontTempChat = font; // using fontTempChat.rawname() does not always work! @@ -424,6 +424,7 @@ void ChatPage::on_pushButtonChangeChatFont_clicked() QStringList fontname = fontTempChat.toString().split(","); ui.labelChatFontPreview->setText(fontname[0]); ui.labelChatFontPreview->setFont(fontTempChat); + updateChatParams(); } } diff --git a/retroshare-gui/src/gui/settings/ChatPage.ui b/retroshare-gui/src/gui/settings/ChatPage.ui index 152e3530e..14d1cc6f8 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.ui +++ b/retroshare-gui/src/gui/settings/ChatPage.ui @@ -14,7 +14,7 @@ - 2 + 0 @@ -866,7 +866,7 @@ QTabWidget::North - 2 + 0