mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 04:46:47 -05:00
Added for channel composer default size settings
This commit is contained in:
parent
3ffa362079
commit
6d394c9f55
7 changed files with 149 additions and 91 deletions
|
|
@ -614,3 +614,26 @@ void RichTextEdit::checkLength(){
|
|||
void RichTextEdit::setPlaceHolderTextPosted() {
|
||||
f_textedit->setPlaceholderText(tr("Text (optional)"));
|
||||
}
|
||||
|
||||
void RichTextEdit::showEvent(QShowEvent *event)
|
||||
{
|
||||
if (!event->spontaneous()) {
|
||||
updateFontSize();
|
||||
}
|
||||
}
|
||||
|
||||
void RichTextEdit::updateFontSize()
|
||||
{
|
||||
#if defined(Q_OS_DARWIN)
|
||||
int customFontSize = Settings->valueFromGroup("Messages", "MinimumFontSize", 13).toInt();
|
||||
#else
|
||||
int customFontSize = Settings->valueFromGroup("Messages", "MinimumFontSize", 12).toInt();
|
||||
#endif
|
||||
QFont newFont = f_textedit->font();
|
||||
if (newFont.pointSize() != customFontSize) {
|
||||
newFont.setPointSize(customFontSize);
|
||||
QFontMetricsF fontMetrics(newFont);
|
||||
f_textedit->setFont(newFont);
|
||||
f_fontsize->setCurrentIndex(f_fontsize->findText(QString::number(newFont.pointSize())));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue