From 20c4bc3b4a94b6b2cc666a97e1f7f34bcfabcda6 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Fri, 29 Dec 2023 17:24:52 -0500 Subject: [PATCH] InkBox settings: More design fixes --- src/reader/reader.cpp | 8 --- src/settings/settings.cpp | 12 +--- src/settings/settings.ui | 113 ++++++++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 57 deletions(-) diff --git a/src/reader/reader.cpp b/src/reader/reader.cpp index 766e756..a1371e3 100644 --- a/src/reader/reader.cpp +++ b/src/reader/reader.cpp @@ -119,14 +119,6 @@ reader::reader(QWidget *parent) : ui->viewHighlightsBtn->setText(""); ui->viewHighlightsBtn->setIcon(QIcon(":/resources/view-highlights.png")); - // On the Mini with QT_FONT_DPI set to 187 (default for this device), quitBtn makes the UI go beyond the limits of the screen when the menu bar is shown - if(global::deviceID == "n705\n") { - ui->quitBtn->hide(); - ui->quitBtn->deleteLater(); - ui->line_19->hide(); - ui->line_19->deleteLater(); - } - // Style misc. ui->bookInfoLabel->setStyleSheet("font-style: italic"); diff --git a/src/settings/settings.cpp b/src/settings/settings.cpp index 53ea144..ef38bbc 100644 --- a/src/settings/settings.cpp +++ b/src/settings/settings.cpp @@ -81,9 +81,7 @@ settings::settings(QWidget *parent) : homeIconHeight = sW / 20; } - ui->headerBtn->hide(); - ui->headerLabel->hide(); - ui->line_12->hide(); + ui->headerStackedWidget->hide(); ui->headerBtn->setIcon(QIcon(":/resources/chevron-left.png")); ui->headerBtn->setProperty("type", "borderless"); @@ -1109,14 +1107,10 @@ void settings::on_settingsStackedWidget_currentChanged(int arg1) { if(ui->settingsStackedWidget->currentIndex() != 0) { ui->headerLabel->setText(ui->settingsStackedWidget->currentWidget()->objectName()); - ui->headerBtn->show(); - ui->headerLabel->show(); - ui->line_12->show(); + ui->headerStackedWidget->show(); } else { - ui->headerBtn->hide(); - ui->headerLabel->hide(); - ui->line_12->hide(); + ui->headerStackedWidget->hide(); } } diff --git a/src/settings/settings.ui b/src/settings/settings.ui index 4a262fc..ad76896 100644 --- a/src/settings/settings.ui +++ b/src/settings/settings.ui @@ -87,50 +87,83 @@ - - - 0 + + + + 0 + 0 + - - - - Back + + + + QLayout::SetDefaultConstraint - - - - - - Qt::Horizontal + + 0 - - - 40 - 20 - + + 0 - - - - - - headerLabel + + 0 - - - - - - - - QFrame::Plain - - - 2 - - - Qt::Horizontal - + + 0 + + + + + QLayout::SetDefaultConstraint + + + 0 + + + + + Back + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + headerLabel + + + + + + + + + QFrame::Plain + + + 2 + + + Qt::Horizontal + + + + + + @@ -375,7 +408,7 @@ Save && Quit 0 0 419 - 726 + 387