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); connect(ui->textOutput, &QPlainTextEdit::customContextMenuRequested, this, &MainWindow::OutputContextMenu);
QSettings settings(CONFIG_FILE, QSettings::IniFormat); 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()); SetOutputFont(settings.value(FONT, ui->textOutput->font().toString()).toString());
TextThread::filterRepetition = settings.value(FILTER_REPETITION, TextThread::filterRepetition).toBool(); TextThread::filterRepetition = settings.value(FILTER_REPETITION, TextThread::filterRepetition).toBool();
autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool(); autoAttach = settings.value(AUTO_ATTACH, autoAttach).toBool();

View File

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