mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -08:00
N705: Fix Reader framework bug and improve reset dialog
On this device, the Quit button makes the UI go beyond the limits of the screen when the menu bar is shown. Thus, the user will have to resort on the default Quit button found in MainWindow.
This commit is contained in:
parent
56db7eac6b
commit
0b4b1f51e1
2 changed files with 14 additions and 1 deletions
|
@ -77,7 +77,12 @@ generalDialog::generalDialog(QWidget *parent) :
|
||||||
resetDialog = true;
|
resetDialog = true;
|
||||||
ui->okBtn->setText("Proceed");
|
ui->okBtn->setText("Proceed");
|
||||||
ui->cancelBtn->setText("Go back");
|
ui->cancelBtn->setText("Go back");
|
||||||
ui->bodyLabel->setText("This will erase any books you have stored on the deivce.\nSettings will be reset.");
|
if(readFile("/opt/inkbox_device") != "n705\n") {
|
||||||
|
ui->bodyLabel->setText("This will erase any books you have stored on the device.\nSettings will be reset.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->bodyLabel->setText("This will erase any books\nyou have stored on the device.\nSettings will be reset.");
|
||||||
|
}
|
||||||
ui->headerLabel->setText("Warning");
|
ui->headerLabel->setText("Warning");
|
||||||
QTimer::singleShot(50, this, SLOT(adjust_size()));
|
QTimer::singleShot(50, this, SLOT(adjust_size()));
|
||||||
string_writeconfig("/inkbox/resetDialog", "false");
|
string_writeconfig("/inkbox/resetDialog", "false");
|
||||||
|
|
|
@ -102,6 +102,14 @@ reader::reader(QWidget *parent) :
|
||||||
ui->quitBtn->setText("");
|
ui->quitBtn->setText("");
|
||||||
ui->quitBtn->setIcon(QIcon(":/resources/power.png"));
|
ui->quitBtn->setIcon(QIcon(":/resources/power.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(readFile("/opt/inkbox_device") == "n705\n") {
|
||||||
|
ui->quitBtn->hide();
|
||||||
|
ui->quitBtn->deleteLater();
|
||||||
|
ui->line_19->hide();
|
||||||
|
ui->line_19->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
// Style misc.
|
// Style misc.
|
||||||
ui->bookInfoLabel->setStyleSheet("font-style: italic");
|
ui->bookInfoLabel->setStyleSheet("font-style: italic");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue