mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +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
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