From d9a46e76154ce31fa59d511bd13ea5a5a9f70d10 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Wed, 18 Aug 2021 19:46:32 -0400 Subject: [PATCH] Brightness warmth: set warmth before cinematic brightness Allows a more fluid animation. --- mainwindow.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 0ebfb9a..a1215fd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -812,17 +812,6 @@ void MainWindow::setBatteryIcon() { } void MainWindow::setInitialBrightness() { - int brightness_value = brightness_checkconfig(".config/03-brightness/config"); - if(checkconfig("/tmp/oobe-inkbox_completed") == true or checkconfig("/tmp/inkbox-cinematicBrightness_ran") == true) { - // Coming from OOBE setup; not doing that fancy stuff again ;p - QFile::remove("/tmp/oobe-inkbox_completed"); - pre_set_brightness(brightness_value); - } - else { - // Fancy brightness fade-in - string_writeconfig("/tmp/inkbox-cinematicBrightness_ran", "true"); - cinematicBrightness(brightness_value, 0); - } string_checkconfig_ro("/opt/inkbox_device"); if(checkconfig_str_val == "n873\n") { int warmth; @@ -835,6 +824,17 @@ void MainWindow::setInitialBrightness() { } set_warmth(warmth); } + int brightness_value = brightness_checkconfig(".config/03-brightness/config"); + if(checkconfig("/tmp/oobe-inkbox_completed") == true or checkconfig("/tmp/inkbox-cinematicBrightness_ran") == true) { + // Coming from OOBE setup; not doing that fancy stuff again ;p + QFile::remove("/tmp/oobe-inkbox_completed"); + pre_set_brightness(brightness_value); + } + else { + // Fancy brightness fade-in + string_writeconfig("/tmp/inkbox-cinematicBrightness_ran", "true"); + cinematicBrightness(brightness_value, 0); + } } void MainWindow::refreshScreen() {