mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
ClockSettings: Don't change format text when checking "Custom"
Previously, when you selected to have a custom format, whatever was in the custom-format box would get replaced with the format for 12-hour-without-seconds. Now, it keeps whatever was in the box before - which is less disorientating, and lets you tweak the existing format.
This commit is contained in:
parent
c80fca78b3
commit
ae469b9afa
Notes:
sideshowbarker
2024-07-17 11:34:15 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/ae469b9afa Pull-request: https://github.com/SerenityOS/serenity/pull/13764
1 changed files with 9 additions and 3 deletions
|
@ -48,13 +48,17 @@ ClockSettingsWidget::ClockSettingsWidget()
|
|||
m_custom_format_input->set_enabled(true);
|
||||
}
|
||||
|
||||
m_24_hour_radio->on_checked = [&](bool) {
|
||||
m_24_hour_radio->on_checked = [&](bool checked) {
|
||||
if (!checked)
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(true);
|
||||
m_custom_format_input->set_enabled(false);
|
||||
update_time_format_string();
|
||||
};
|
||||
|
||||
twelve_hour_radio.on_checked = [&](bool) {
|
||||
twelve_hour_radio.on_checked = [&](bool checked) {
|
||||
if (!checked)
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(true);
|
||||
m_custom_format_input->set_enabled(false);
|
||||
update_time_format_string();
|
||||
|
@ -64,7 +68,9 @@ ClockSettingsWidget::ClockSettingsWidget()
|
|||
update_time_format_string();
|
||||
};
|
||||
|
||||
custom_radio.on_checked = [&](bool) {
|
||||
custom_radio.on_checked = [&](bool checked) {
|
||||
if (!checked)
|
||||
return;
|
||||
m_show_seconds_checkbox->set_enabled(false);
|
||||
m_custom_format_input->set_enabled(true);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue