Fix Chat Font setting saving.

And don't use native dialog.
This commit is contained in:
Phenom 2017-05-19 18:40:17 +02:00
parent 86118d9de6
commit 7acefda943
3 changed files with 6 additions and 4 deletions

View File

@ -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();

View File

@ -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();
}
}

View File

@ -14,7 +14,7 @@
<item row="3" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="general">
<attribute name="title">
@ -866,7 +866,7 @@
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="publicTab">
<attribute name="title">