mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 02:36:23 -04:00
fixed font handling for chat config page (Patch from HM)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7826 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
64c8048981
commit
bef921f70c
5 changed files with 45 additions and 10 deletions
|
@ -127,6 +127,7 @@ ChatPage::save(QString &/*errmsg*/)
|
|||
Settings->endGroup();
|
||||
|
||||
Settings->setChatScreenFont(fontTempChat.toString());
|
||||
NotifyQt::getInstance()->notifyChatFontChanged();
|
||||
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
|
||||
|
@ -245,8 +246,11 @@ ChatPage::load()
|
|||
ui.publicChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PUBLIC));
|
||||
ui.privateChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PRIVATE));
|
||||
ui.lobbyChatSaveCount->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_LOBBY));
|
||||
|
||||
ui.labelChatFontPreview->setText(fontTempChat.rawName());
|
||||
|
||||
// using fontTempChat.rawname() does not always work!
|
||||
// see http://doc.qt.digia.com/qt-maemo/qfont.html#rawName
|
||||
QStringList fontname = fontTempChat.toString().split(",");
|
||||
ui.labelChatFontPreview->setText(fontname[0]);
|
||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||
|
||||
ui.max_storage_period->setValue(rsHistory->getMaxStorageDuration()/86400) ;
|
||||
|
@ -298,7 +302,10 @@ void ChatPage::on_pushButtonChangeChatFont_clicked()
|
|||
QFont font = QFontDialog::getFont(&ok, fontTempChat, this);
|
||||
if (ok) {
|
||||
fontTempChat = font;
|
||||
ui.labelChatFontPreview->setText(fontTempChat.rawName());
|
||||
// using fontTempChat.rawname() does not always work!
|
||||
// see http://doc.qt.digia.com/qt-maemo/qfont.html#rawName
|
||||
QStringList fontname = fontTempChat.toString().split(",");
|
||||
ui.labelChatFontPreview->setText(fontname[0]);
|
||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue