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() {
string_checkconfig_ro("/opt/inkbox_device");
if(checkconfig_str_val == "n613") {
if(checkconfig_str_val == "n613\n") {
string_checkconfig_ro(".config/03-brightness/config");
int brightness;
if(checkconfig_str_val == "") {

View file

@ -617,13 +617,6 @@ void MainWindow::on_pushButton_clicked()
void MainWindow::on_searchBtn_clicked()
{
// 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()

View file

@ -400,6 +400,8 @@ void settings::on_requestLeaseBtn_clicked()
void settings::on_usbmsBtn_clicked()
{
QTimer::singleShot(1500, this, SLOT(brightnessDown()));
QString umount_prog ("umount");
QStringList umount_args;
umount_args << "/dev/loop0";
@ -797,3 +799,7 @@ void settings::on_sleepTimeoutComboBox_currentIndexChanged(const QString &arg1)
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_pageSizeHeightSpinBox_valueChanged(int arg1);
void on_readerScrollBarCheckBox_toggled(bool checked);
void on_sleepTimeoutComboBox_currentIndexChanged(const QString &arg1);
void brightnessDown();
private:
Ui::settings *ui;

View file

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

View file

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