From 200c01f4ab254f37c862442e42e4a2e82f21a83e Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 28 Feb 2020 00:12:23 -0700 Subject: [PATCH] more reliable default font and only load window position if on screen --- GUI/mainwindow.cpp | 2 +- GUI/mainwindow.ui | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index feae23f..120b427 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -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(); diff --git a/GUI/mainwindow.ui b/GUI/mainwindow.ui index 30ef47f..e77ffee 100644 --- a/GUI/mainwindow.ui +++ b/GUI/mainwindow.ui @@ -6,7 +6,7 @@ 0 0 - 900 + 1000 600 @@ -77,8 +77,8 @@ - Meiryo - 12 + Meiryo UI + 13