InkBox settings: More design fixes

This commit is contained in:
Nicolas Mailloux 2023-12-29 17:24:52 -05:00
parent d95c2a370e
commit 20c4bc3b4a
3 changed files with 76 additions and 57 deletions

View file

@ -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");

View file

@ -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();
}
}

View file

@ -87,50 +87,83 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="bottomMargin">
<number>0</number>
<widget class="QStackedWidget" name="headerStackedWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<widget class="QPushButton" name="headerBtn">
<property name="text">
<string> Back</string>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="leftMargin">
<number>0</number>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="topMargin">
<number>0</number>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="headerLabel">
<property name="text">
<string>headerLabel</string>
<property name="rightMargin">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_12">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="headerBtn">
<property name="text">
<string> Back</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="headerLabel">
<property name="text">
<string>headerLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_12">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
<item>
@ -375,7 +408,7 @@ Save &amp;&amp; Quit
<x>0</x>
<y>0</y>
<width>419</width>
<height>726</height>
<height>387</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">