more reliable default font and only load window position if on screen

This commit is contained in:
Akash Mozumdar 2020-02-28 00:12:23 -07:00
parent d6b0114f27
commit 200c01f4ab
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->textOutput, &QPlainTextEdit::customContextMenuRequested, this, &MainWindow::OutputContextMenu);
QSettings settings(CONFIG_FILE, QSettings::IniFormat);
if (settings.contains(WINDOW)) setGeometry(settings.value(WINDOW).toRect());
if (settings.contains(WINDOW) && QApplication::screenAt(settings.value(WINDOW).toRect().center())) setGeometry(settings.value(WINDOW).toRect());
SetOutputFont(settings.value(FONT, ui->textOutput->font().toString()).toString());
TextThread::filterRepetition = settings.value(FILTER_REPETITION, TextThread::filterRepetition).toBool();
autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool();

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>900</width>
<width>1000</width>
<height>600</height>
</rect>
</property>
@ -77,8 +77,8 @@
<widget class="QPlainTextEdit" name="textOutput">
<property name="font">
<font>
<family>Meiryo</family>
<pointsize>12</pointsize>
<family>Meiryo UI</family>
<pointsize>13</pointsize>
</font>
</property>
<property name="contextMenuPolicy">