mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
Fix Chat Font setting saving.
And don't use native dialog.
This commit is contained in:
parent
86118d9de6
commit
7acefda943
3 changed files with 6 additions and 4 deletions
|
@ -1440,7 +1440,8 @@ void ChatWidget::colorChanged()
|
||||||
void ChatWidget::chooseFont()
|
void ChatWidget::chooseFont()
|
||||||
{
|
{
|
||||||
bool ok;
|
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) {
|
if (ok) {
|
||||||
currentFont = font;
|
currentFont = font;
|
||||||
setFont();
|
setFont();
|
||||||
|
|
|
@ -416,7 +416,7 @@ ChatPage::load()
|
||||||
void ChatPage::on_pushButtonChangeChatFont_clicked()
|
void ChatPage::on_pushButtonChangeChatFont_clicked()
|
||||||
{
|
{
|
||||||
bool ok;
|
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) {
|
if (ok) {
|
||||||
fontTempChat = font;
|
fontTempChat = font;
|
||||||
// using fontTempChat.rawname() does not always work!
|
// using fontTempChat.rawname() does not always work!
|
||||||
|
@ -424,6 +424,7 @@ void ChatPage::on_pushButtonChangeChatFont_clicked()
|
||||||
QStringList fontname = fontTempChat.toString().split(",");
|
QStringList fontname = fontTempChat.toString().split(",");
|
||||||
ui.labelChatFontPreview->setText(fontname[0]);
|
ui.labelChatFontPreview->setText(fontname[0]);
|
||||||
ui.labelChatFontPreview->setFont(fontTempChat);
|
ui.labelChatFontPreview->setFont(fontTempChat);
|
||||||
|
updateChatParams();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="general">
|
<widget class="QWidget" name="general">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -866,7 +866,7 @@
|
||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="publicTab">
|
<widget class="QWidget" name="publicTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue