mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
Calendar: Add setting to choose default view
This commit adds an entry to the Calendar Settings to allow the user to select between the month and year views as the startup default.
This commit is contained in:
parent
0eceed4fd7
commit
a1d98b825d
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/iCristalrope
Commit: a1d98b825d
Pull-request: https://github.com/SerenityOS/serenity/pull/14596
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/krkk
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 58 additions and 3 deletions
|
@ -45,6 +45,14 @@ Calendar::Calendar(Core::DateTime date_time, Mode mode)
|
|||
}
|
||||
}
|
||||
|
||||
auto default_view = Config::read_string("Calendar"sv, "View"sv, "DefaultView"sv, "Month"sv);
|
||||
if (default_view == "Year") {
|
||||
m_mode = Year;
|
||||
m_show_days = false;
|
||||
m_show_year = true;
|
||||
m_show_month_year = true;
|
||||
}
|
||||
|
||||
update_tiles(m_selected_date.year(), m_selected_date.month());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue