style: Clean up calendar widget css

- use existing button styles for the calendar items
- change visual treatment of weekends; fixes #1767
- clean up class names

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2769>
This commit is contained in:
Sam Hewitt
2023-05-17 16:24:49 -02:30
committed by Marge Bot
parent 5fff6fd05c
commit d6b0121006
3 changed files with 51 additions and 81 deletions

View File

@@ -519,7 +519,7 @@ var Calendar = GObject.registerClass({
// and we want, ideally, a single character for e.g. S M T W T F S
let customDayAbbrev = _getCalendarDayAbbreviation(iter.getDay());
let label = new St.Label({
style_class: 'calendar-day-base calendar-day-heading',
style_class: 'calendar-day calendar-day-heading',
text: customDayAbbrev,
can_focus: true,
});
@@ -667,12 +667,12 @@ var Calendar = GObject.registerClass({
});
let hasEvents = this._eventSource.hasEvents(iter);
let styleClass = 'calendar-day-base calendar-day';
let styleClass = 'calendar-day';
if (_isWorkDay(iter))
styleClass += ' calendar-work-day';
styleClass += ' calendar-weekday';
else
styleClass += ' calendar-nonwork-day';
styleClass += ' calendar-weekend';
// Hack used in lieu of border-collapse - see gnome-shell.css
if (row == 2)
@@ -687,7 +687,7 @@ var Calendar = GObject.registerClass({
if (sameDay(now, iter))
styleClass += ' calendar-today';
else if (iter.getMonth() != this._selectedDate.getMonth())
styleClass += ' calendar-other-month-day';
styleClass += ' calendar-other-month';
if (hasEvents)
styleClass += ' calendar-day-with-events';