mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 06:49:24 -05:00
Revert "Brightness settings fixes" (#1865)
This reverts commit 994e426d1e
.
This commit is contained in:
parent
994e426d1e
commit
b7e5bedf4b
@ -763,10 +763,12 @@ SetFakeBrightnessView::SetFakeBrightnessView(NavigationView& nav) {
|
|||||||
field_fake_brightness.set_by_value(pmem::fake_brightness_level());
|
field_fake_brightness.set_by_value(pmem::fake_brightness_level());
|
||||||
checkbox_brightness_switch.set_value(pmem::apply_fake_brightness());
|
checkbox_brightness_switch.set_value(pmem::apply_fake_brightness());
|
||||||
|
|
||||||
|
checkbox_brightness_switch.on_select = [this](Checkbox&, bool v) {
|
||||||
|
pmem::set_apply_fake_brightness(v);
|
||||||
|
};
|
||||||
|
|
||||||
button_save.on_select = [&nav, this](Button&) {
|
button_save.on_select = [&nav, this](Button&) {
|
||||||
pmem::set_apply_fake_brightness(checkbox_brightness_switch.value());
|
|
||||||
pmem::set_fake_brightness_level(field_fake_brightness.selected_index_value());
|
pmem::set_fake_brightness_level(field_fake_brightness.selected_index_value());
|
||||||
send_system_refresh();
|
|
||||||
nav.pop();
|
nav.pop();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -330,8 +330,21 @@ SystemStatusView::SystemStatusView(
|
|||||||
toggle_fake_brightness.on_change = [this, &nav](bool v) {
|
toggle_fake_brightness.on_change = [this, &nav](bool v) {
|
||||||
set_dirty();
|
set_dirty();
|
||||||
pmem::set_apply_fake_brightness(v);
|
pmem::set_apply_fake_brightness(v);
|
||||||
|
if (nav.is_valid() && v) {
|
||||||
|
nav.display_modal(
|
||||||
|
"Brightness",
|
||||||
|
"You have enabled brightness\n"
|
||||||
|
"adjustment. Performance\n"
|
||||||
|
"will be impacted slightly.");
|
||||||
|
|
||||||
|
// TODO: refresh interface to prevent reboot requirement
|
||||||
|
// TODO: increase performance
|
||||||
|
} else if (!v) {
|
||||||
|
nav.display_modal(
|
||||||
|
"Brightness",
|
||||||
|
"Brightness adjust disabled.");
|
||||||
|
}
|
||||||
refresh();
|
refresh();
|
||||||
parent()->set_dirty(); // The parent of NavigationView shal be the SystemView
|
|
||||||
};
|
};
|
||||||
|
|
||||||
button_bias_tee.on_select = [this](ImageButton&) {
|
button_bias_tee.on_select = [this](ImageButton&) {
|
||||||
@ -400,9 +413,6 @@ void SystemStatusView::refresh() {
|
|||||||
button_converter.set_bitmap(pmem::config_updown_converter() ? &bitmap_icon_downconvert : &bitmap_icon_upconvert);
|
button_converter.set_bitmap(pmem::config_updown_converter() ? &bitmap_icon_downconvert : &bitmap_icon_upconvert);
|
||||||
button_converter.set_foreground(pmem::config_converter() ? Color::red() : Color::light_grey());
|
button_converter.set_foreground(pmem::config_converter() ? Color::red() : Color::light_grey());
|
||||||
|
|
||||||
// Brightness
|
|
||||||
toggle_fake_brightness.set_value(pmem::apply_fake_brightness());
|
|
||||||
|
|
||||||
set_dirty();
|
set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user