Correct layout

Some spacer widgets are not required anymore because of the new
QTextEdit.
This commit is contained in:
Nicolas Mailloux 2021-06-20 17:32:25 -04:00
parent 40262b0506
commit 386832aca2
5 changed files with 27 additions and 84 deletions

View file

@ -293,12 +293,11 @@ namespace {
string_checkconfig_ro("/external_root/opt/isa/version"); string_checkconfig_ro("/external_root/opt/isa/version");
global::systemInfoText.append(checkconfig_str_val); global::systemInfoText.append(checkconfig_str_val);
global::systemInfoText.append("</b>"); global::systemInfoText.append("</b>");
global::systemInfoText.append("\n<b>Device UID:</b> "); global::systemInfoText.append("<br><b>Device UID:</b> ");
global::systemInfoText.append(deviceUID); global::systemInfoText.append(deviceUID);
global::systemInfoText.append("\n"); global::systemInfoText.append("<br><b>Kernel version:</b> ");
global::systemInfoText.append("<b>Kernel version:</b> ");
global::systemInfoText.append(kernelVersion); global::systemInfoText.append(kernelVersion);
global::systemInfoText.append("\n"); global::systemInfoText.append("<br>");
} }
void resetKoboxUserData() { void resetKoboxUserData() {
global::kobox::resetKoboxUserDataBool = true; global::kobox::resetKoboxUserDataBool = true;

View file

@ -125,12 +125,10 @@ reader::reader(QWidget *parent) :
ui->wordWidget->setVisible(false); ui->wordWidget->setVisible(false);
if(checkconfig(".config/11-menubar/sticky") == true) { if(checkconfig(".config/11-menubar/sticky") == true) {
ui->menuWidget->setVisible(true); ui->menuWidget->setVisible(true);
ui->spacerWidget->setVisible(true);
ui->statusBarWidget->setVisible(true); ui->statusBarWidget->setVisible(true);
} }
else { else {
ui->menuWidget->setVisible(false); ui->menuWidget->setVisible(false);
ui->spacerWidget->setVisible(false);
ui->statusBarWidget->setVisible(false); ui->statusBarWidget->setVisible(false);
} }
@ -1004,13 +1002,6 @@ void reader::menubar_show() {
else { else {
ui->brightnessWidget->setVisible(true); ui->brightnessWidget->setVisible(true);
} }
if(checkconfig(".config/11-menubar/sticky") == true) {
ui->spacerWidget->setVisible(false);
}
else {
// Safety measure
ui->spacerWidget->setVisible(false);
}
menubar_shown = true; menubar_shown = true;
} }
@ -1028,11 +1019,9 @@ void reader::menubar_hide() {
ui->optionsBtn->show(); ui->optionsBtn->show();
ui->menuBarWidget->setVisible(false); ui->menuBarWidget->setVisible(false);
if(checkconfig(".config/11-menubar/sticky") == true) { if(checkconfig(".config/11-menubar/sticky") == true) {
ui->spacerWidget->setVisible(true);
ui->statusBarWidget->setVisible(true); ui->statusBarWidget->setVisible(true);
} }
else { else {
ui->spacerWidget->setVisible(false);
ui->statusBarWidget->setVisible(false); ui->statusBarWidget->setVisible(false);
ui->menuWidget->setVisible(false); ui->menuWidget->setVisible(false);
} }

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>490</width> <width>490</width>
<height>676</height> <height>726</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -16,7 +16,7 @@
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="12" column="0"> <item row="10" column="0">
<widget class="QStackedWidget" name="wordWidget"> <widget class="QStackedWidget" name="wordWidget">
<widget class="QWidget" name="page_8"> <widget class="QWidget" name="page_8">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
@ -402,6 +402,12 @@
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="inkboxLabel"> <widget class="QLabel" name="inkboxLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>InkBox</string> <string>InkBox</string>
</property> </property>
@ -440,43 +446,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QStackedWidget" name="spacerWidget">
<widget class="QWidget" name="page_10">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>37</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_11"/>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_5"/> <widget class="QWidget" name="page_5"/>
@ -905,7 +874,7 @@
<widget class="QWidget" name="page_21"/> <widget class="QWidget" name="page_21"/>
</widget> </widget>
</item> </item>
<item row="17" column="0"> <item row="15" column="0">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="4"> <item row="0" column="4">
<widget class="Line" name="line_3"> <widget class="Line" name="line_3">
@ -981,20 +950,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="11" column="0"> <item row="9" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="0">
<widget class="QTextEdit" name="text"> <widget class="QTextEdit" name="text">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -1022,7 +978,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="14" column="0">
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
@ -1035,19 +991,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>

View file

@ -396,7 +396,7 @@ OK
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="wordsNumberLabel"> <widget class="QLabel" name="wordsNumberLabel">
<property name="text"> <property name="text">
<string>Words number per page</string> <string>Words number per page (plain text files)</string>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -36,6 +36,18 @@
<verstretch>50</verstretch> <verstretch>50</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>