mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
ClockSettings: Set window modified state
This commit is contained in:
committed by
Andreas Kling
parent
f27985a021
commit
57bac17b9f
Notes:
sideshowbarker
2024-07-17 12:01:08 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/57bac17b9f Pull-request: https://github.com/SerenityOS/serenity/pull/14006 Reviewed-by: https://github.com/MacDue
@@ -35,6 +35,7 @@ ClockSettingsWidget::ClockSettingsWidget()
|
||||
m_custom_format_input->set_enabled(false);
|
||||
m_custom_format_input->on_change = [&] {
|
||||
m_time_format = m_custom_format_input->get_text();
|
||||
set_modified(true);
|
||||
update_clock_preview();
|
||||
};
|
||||
|
||||
@@ -60,6 +61,7 @@ ClockSettingsWidget::ClockSettingsWidget()
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(true);
|
||||
m_custom_format_input->set_enabled(false);
|
||||
set_modified(true);
|
||||
update_time_format_string();
|
||||
};
|
||||
|
||||
@@ -68,10 +70,12 @@ ClockSettingsWidget::ClockSettingsWidget()
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(true);
|
||||
m_custom_format_input->set_enabled(false);
|
||||
set_modified(true);
|
||||
update_time_format_string();
|
||||
};
|
||||
|
||||
m_show_seconds_checkbox->on_checked = [&](bool) {
|
||||
set_modified(true);
|
||||
update_time_format_string();
|
||||
};
|
||||
|
||||
@@ -80,6 +84,7 @@ ClockSettingsWidget::ClockSettingsWidget()
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(false);
|
||||
m_custom_format_input->set_enabled(true);
|
||||
set_modified(true);
|
||||
};
|
||||
|
||||
m_clock_preview_update_timer = Core::Timer::create_repeating(1000, [&]() {
|
||||
|
||||
Reference in New Issue
Block a user