Enhance the style of the checkboxes for multi-selection (#1244)

* Enhance the checkboxes' style for multi-selection by applying the selected style, if available, to the checkboxes currently selected.
This commit is contained in:
Davide Piccinini
2024-09-09 16:35:01 +02:00
committed by GitHub
parent f8a4b2271d
commit a55b80220d
4 changed files with 20 additions and 10 deletions

View File

@ -195,7 +195,7 @@ public sealed class Calendar : JustInTimeRenderable, IHasCulture, IHasTableBorde
while (currentDay <= daysInMonth)
{
if (weekdays[currentDay - 1] == weekday)
{
{
var todayEvent = _calendarEvents.LastOrDefault(e => e.Month == Month && e.Day == currentDay);
if (todayEvent != null)
{

View File

@ -28,34 +28,34 @@ public sealed class CalendarEvent
/// <summary>
/// Gets the custom highlight style of the calendar event.
/// </summary>
public Style? CustomHighlightStyle { get; }
public Style? CustomHighlightStyle { get; }
/// <summary>
/// Initializes a new instance of the <see cref="CalendarEvent"/> class.
/// </summary>
/// <param name="year">The year of the calendar event.</param>
/// <param name="month">The month of the calendar event.</param>
/// <param name="day">The day of the calendar event.</param>
/// <param name="day">The day of the calendar event.</param>
/// <param name="customHighlightStyle">The custom highlight style of the calendar event.</param>
public CalendarEvent(int year, int month, int day, Style? customHighlightStyle = null)
: this(string.Empty, year, month, day, customHighlightStyle)
{
}
}
/// <summary>
/// Initializes a new instance of the <see cref="CalendarEvent"/> class.
/// </summary>
/// <param name="description">The calendar event description.</param>
/// <param name="year">The year of the calendar event.</param>
/// <param name="month">The month of the calendar event.</param>
/// <param name="day">The day of the calendar event.</param>
/// <param name="day">The day of the calendar event.</param>
/// <param name="customHighlightStyle">The custom highlight style of the calendar event.</param>
public CalendarEvent(string description, int year, int month, int day, Style? customHighlightStyle = null)
{
Description = description ?? string.Empty;
Year = year;
Month = month;
Day = day;
Day = day;
CustomHighlightStyle = customHighlightStyle;
}
}