USBMS splash: bring down brightness

This commit is contained in:
Nicolas Mailloux 2021-06-29 15:28:54 -04:00
parent b7e772cbe1
commit c56d831baa
6 changed files with 16 additions and 10 deletions

View file

@ -186,7 +186,7 @@ namespace {
} }
int get_brightness() { int get_brightness() {
string_checkconfig_ro("/opt/inkbox_device"); string_checkconfig_ro("/opt/inkbox_device");
if(checkconfig_str_val == "n613") { if(checkconfig_str_val == "n613\n") {
string_checkconfig_ro(".config/03-brightness/config"); string_checkconfig_ro(".config/03-brightness/config");
int brightness; int brightness;
if(checkconfig_str_val == "") { if(checkconfig_str_val == "") {

View file

@ -617,13 +617,6 @@ void MainWindow::on_pushButton_clicked()
void MainWindow::on_searchBtn_clicked() void MainWindow::on_searchBtn_clicked()
{ {
// Hopefully this button will do something one day... // Hopefully this button will do something one day...
/*
global::text::textBrowserDialog = true;
global::text::textBrowserContents = "Hullo";
generalDialogWindow = new generalDialog();
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
generalDialogWindow->show();
*/
} }
void MainWindow::on_quitBtn_clicked() void MainWindow::on_quitBtn_clicked()

View file

@ -400,6 +400,8 @@ void settings::on_requestLeaseBtn_clicked()
void settings::on_usbmsBtn_clicked() void settings::on_usbmsBtn_clicked()
{ {
QTimer::singleShot(1500, this, SLOT(brightnessDown()));
QString umount_prog ("umount"); QString umount_prog ("umount");
QStringList umount_args; QStringList umount_args;
umount_args << "/dev/loop0"; umount_args << "/dev/loop0";
@ -797,3 +799,7 @@ void settings::on_sleepTimeoutComboBox_currentIndexChanged(const QString &arg1)
string_writeconfig(".config/15-sleep_timeout/config", "60"); string_writeconfig(".config/15-sleep_timeout/config", "60");
} }
} }
void settings::brightnessDown() {
cinematicBrightness(0, 1);
}

View file

@ -50,8 +50,8 @@ private slots:
void on_pageSizeWidthSpinBox_valueChanged(int arg1); void on_pageSizeWidthSpinBox_valueChanged(int arg1);
void on_pageSizeHeightSpinBox_valueChanged(int arg1); void on_pageSizeHeightSpinBox_valueChanged(int arg1);
void on_readerScrollBarCheckBox_toggled(bool checked); void on_readerScrollBarCheckBox_toggled(bool checked);
void on_sleepTimeoutComboBox_currentIndexChanged(const QString &arg1); void on_sleepTimeoutComboBox_currentIndexChanged(const QString &arg1);
void brightnessDown();
private: private:
Ui::settings *ui; Ui::settings *ui;

View file

@ -64,7 +64,7 @@ usbms_splash::usbms_splash(QWidget *parent) :
void usbms_splash::usbms_launch() void usbms_splash::usbms_launch()
{ {
cinematicBrightness(0, 1); QTimer::singleShot(1500, this, SLOT(brightnessDown()));
QString umount_prog ("umount"); QString umount_prog ("umount");
QStringList umount_args; QStringList umount_args;
@ -140,3 +140,7 @@ usbms_splash::~usbms_splash()
{ {
delete ui; delete ui;
} }
void usbms_splash::brightnessDown() {
cinematicBrightness(0, 1);
}

View file

@ -17,6 +17,9 @@ public:
void usbms_launch(); void usbms_launch();
private slots:
void brightnessDown();
private: private:
Ui::usbms_splash *ui; Ui::usbms_splash *ui;
}; };