Merge pull request #826 from PhenomRetroShare/Fix_ChatFontSetting

Fix Chat Font setting saving.
This commit is contained in:
csoler 2017-05-19 22:12:02 +02:00 committed by GitHub
commit d79c117ee8
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">