From 76728b7d4bcaded952f9eefdcf99ecc313f0dfe5 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Mon, 5 Sep 2022 10:37:57 -0400 Subject: [PATCH] GUI: Replace monospace font with Roboto Mono; Fixes for N873 --- src/reader/reader.cpp | 4 ++++ src/reader/reader.ui | 5 +++++ src/widgets/dialogs/wifi/connectiondialog.cpp | 5 ++++- src/widgets/dialogs/wifi/wifidialog.cpp | 2 +- src/widgets/dialogs/wifi/wifilogger.cpp | 8 ++++---- src/widgets/virtualKeyboard/virtualkeyboard.cpp | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/reader/reader.cpp b/src/reader/reader.cpp index 2c95bff..710764d 100644 --- a/src/reader/reader.cpp +++ b/src/reader/reader.cpp @@ -1310,6 +1310,10 @@ void reader::on_fontChooser_currentIndexChanged(const QString &arg1) ui->text->setFont(notomono); string_writeconfig(".config/04-book/font", "Noto Mono"); } + if(arg1 == "Roboto Mono") { + ui->text->setFont(QFont("Roboto Mono")); + writeFile(".config/04-boot/font", "Roboto Mono"); + } if(arg1 == "Libertinus Serif") { QFont libertinus("Libertinus Serif"); ui->text->setFont(libertinus); diff --git a/src/reader/reader.ui b/src/reader/reader.ui index 3adad3c..e436962 100644 --- a/src/reader/reader.ui +++ b/src/reader/reader.ui @@ -672,6 +672,11 @@ Noto Mono + + + Roboto Mono + + Roboto diff --git a/src/widgets/dialogs/wifi/connectiondialog.cpp b/src/widgets/dialogs/wifi/connectiondialog.cpp index e783dc2..4b12481 100644 --- a/src/widgets/dialogs/wifi/connectiondialog.cpp +++ b/src/widgets/dialogs/wifi/connectiondialog.cpp @@ -12,7 +12,7 @@ connectiondialog::connectiondialog(QWidget *parent) : { ui->setupUi(this); this->setFont(QFont("u001")); - ui->passphraseTextEdit->setFont(QFont("Noto Mono")); + ui->passphraseTextEdit->setFont(QFont("Roboto Mono")); ui->label->setFont(QFont("Inter")); ui->label_2->setFont(QFont("Inter")); @@ -46,6 +46,9 @@ connectiondialog::connectiondialog(QWidget *parent) : if(global::deviceID == "n705\n") { finalHeight = screenGeometry.height() - halfOfHalfHeight * 5.9; } + else if(global::deviceID == "n873\n") { + finalHeight = screenGeometry.height() - halfOfHalfHeight * 6.45; + } else { finalHeight = screenGeometry.height() - halfOfHalfHeight * 6.3; } diff --git a/src/widgets/dialogs/wifi/wifidialog.cpp b/src/widgets/dialogs/wifi/wifidialog.cpp index 971987f..e7f6578 100644 --- a/src/widgets/dialogs/wifi/wifidialog.cpp +++ b/src/widgets/dialogs/wifi/wifidialog.cpp @@ -405,7 +405,7 @@ void wifiDialog::watcher() { forceRefresh = true; QFile recName = QFile("/mnt/onboard/.adds/inkbox/.config/17-wifi_connection_information/essid"); if(recName.exists() == true) { - setStatusText("Reconnecting after suspending to " + readFile(recName.fileName()).replace("\n", "")); + setStatusText("Reconnecting to '" + readFile(recName.fileName()).replace("\n", "") + "'"); } else { // Shouldn't be possible diff --git a/src/widgets/dialogs/wifi/wifilogger.cpp b/src/widgets/dialogs/wifi/wifilogger.cpp index 1b59149..96b9498 100644 --- a/src/widgets/dialogs/wifi/wifilogger.cpp +++ b/src/widgets/dialogs/wifi/wifilogger.cpp @@ -16,12 +16,12 @@ wifilogger::wifilogger(QWidget *parent) : ui->label_8->setFont(QFont("Inter")); ui->returnBtn->setFont(QFont("Inter")); ui->nameLabel->setFont(QFont("Inter")); - ui->allLogsText->setFont(QFont("Noto Mono")); - ui->fancyLogsText->setFont(QFont("Noto Mono")); + ui->allLogsText->setFont(QFont("Roboto Mono")); + ui->fancyLogsText->setFont(QFont("Roboto Mono")); ui->nameLabel->setStyleSheet("font-weight: bold"); ui->returnBtn->setStyleSheet("font-weight: bold"); - ui->allLogsText->setStyleSheet("font-size: 7pt"); - ui->fancyLogsText->setStyleSheet("font-size: 7pt"); + ui->allLogsText->setStyleSheet("font-size: 7.5pt"); + ui->fancyLogsText->setStyleSheet("font-size: 7.5pt"); // Stylesheet, style & misc. QFile stylesheetFile("/mnt/onboard/.adds/inkbox/eink.qss"); diff --git a/src/widgets/virtualKeyboard/virtualkeyboard.cpp b/src/widgets/virtualKeyboard/virtualkeyboard.cpp index c66cf3c..fe80830 100644 --- a/src/widgets/virtualKeyboard/virtualkeyboard.cpp +++ b/src/widgets/virtualKeyboard/virtualkeyboard.cpp @@ -192,7 +192,7 @@ virtualkeyboard::virtualkeyboard(QWidget *parent) : ui->lineEdit->setStyleSheet("border: 3px solid black"); if(global::keyboard::vncDialog == true or global::keyboard::wifiPassphraseDialog == true or global::keyboard::encfsDialog == true) { - ui->lineEdit->setFont(QFont("Noto Mono")); + ui->lineEdit->setFont(QFont("Roboto Mono")); } else if(global::keyboard::searchDialog == true){ ui->lineEdit->setFont(QFont("u001"));