mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +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
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…
Add table
Add a link
Reference in a new issue