summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Calendar.cpp
AgeCommit message (Collapse)Author
2022-10-04LibGUI: Shade Weekends in a slightly different background colorTobias Christiansen
Now, weekends can finally be displayed in the Calender Widget as they are supposed to. They even update when the settings are changed!
2022-10-04LibGUI: Teach Calendar about the new Config ItemsTobias Christiansen
Now the Calendar living in LibGUI knows about FirstDayOfWeekend and WeekendLength.
2022-09-29Calendar: Only accept Calendar notificationsimplicitfield
Previously, changing the time format caused Taskbar to crash. This commit also simplifies TaskbarWindow::config_string_did_change() so that it is in line with the changes made to Calendar::config_string_did_change(). Fixes #15384
2022-09-20Calendar: Update month view on first_day_of_week setting changeOlivier De Cannière
Now when the user changes their preferred first day of the week in the Calendar Settings, the Calendar application and applet views are update accordingly without needing to restart them.
2022-09-20Calendar: Add setting to choose default viewOlivier De Cannière
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.
2022-09-20Calendar: Add a Calendar settings dialog for the first day of the weekOlivier De Cannière
This commit adds a new settings dialog for the Calendar application and applet. It allows the user to specify their preferred first day of the week.
2022-09-20Calendar: Support preferred first day of the weekOlivier De Cannière
2022-04-20LibGUI: Remove Tile.date_time member from CalendarMichael Manganiello
Currently, navigating through different years in the Year view of the Calendar app or the taskbar is very slow. Profiling results show that almost all the time is spent in `Calendar::update_tiles`, and specifically, in `DateTime::create` and `DateTime::set_time`. Performance can improve substantially if the `TZ` environment variable is set [0], but we can improve the current code to perform better nevertheless :^) This diff focuses on removing the need of the `Tile` struct to require the instantiation of a `DateTime` object, which avoids _at least_ 365 object instantiations in the Year view, on each `update_tiles` call. Instead, as the `date_time` isn't used often, we can instantiate it on demand when a particular date is selected. [0] https://blog.packagecloud.io/set-environment-variable-save-thousands-of-system-calls/
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-18Everywhere: Deduplicate day/month name constantsLenny Maiorani
Day and month name constants are defined in numerous places. This pulls them together into a single place and eliminates the duplication. It also ensures they are `constexpr`.
2022-03-18Userland: Change static const variables to static constexprLenny Maiorani
`static const` variables can be computed and initialized at run-time during initialization or the first time a function is called. Change them to `static constexpr` to ensure they are computed at compile-time. This allows some removal of `strlen` because the length of the `StringView` can be used which is pre-computed at compile-time.
2022-03-12Libraries: Use default constructors/destructors in LibGUILenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-26Calendar: Swap Liza for Marietathankyouverycool
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-02LibGUI: Always outline selected date and paint today's date boldthankyouverycool
Fixes selected dates and today's date not painting correctly when viewed from adjacent months
2021-04-02LibGUI+Calendar: Inherit from Frame classthankyouverycool
Fixes incorrect painting with variable thickness and cuts down on some layout boilerplate.
2021-03-30LibGUI+Calendar: Add new month and year views to Calendarthankyouverycool
And overhaul resize and paint events to fix layout edge cases in which Calendar wasn't filling its parent widget completely. Ensures month views always display prior month days for click navigation. Converts Calendar app layout to GML.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling