From bbd2b89df360a2e1f758ec762b58fb366ea354c3 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 26 Jan 2011 14:10:34 -0500 Subject: [PATCH] Collapse two-pixel borders inside the table It's a hack, but it works http://people.freedesktop.org/~david/calendar-table-collapse-hack.png Signed-off-by: David Zeuthen --- data/theme/gnome-shell.css | 9 +++++++++ js/ui/calendar.js | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 5572a20b1..0598937ee 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -771,9 +771,18 @@ StTooltip StLabel { font-weight: bold; } +/* Hack used in lieu of border-collapse - see calendar.js */ .calendar-day { border: 1px solid #333333; color: #cccccc; + border-top-width: 0; + border-left-width: 0; +} +.calendar-day-top { + border-top-width: 1px; +} +.calendar-day-left { + border-left-width: 1px; } .calendar-work-day { diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 925a46fe3..e79702d97 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -553,6 +553,12 @@ Calendar.prototype = { else styleClass += ' calendar-nonwork-day' + // Hack used in lieu of border-collapse - see gnome-shell.css + if (row == 2) + styleClass = 'calendar-day-top ' + styleClass; + if (iter.getDay() == 0) + styleClass = 'calendar-day-left ' + styleClass; + if (_sameDay(now, iter)) styleClass += ' calendar-today'; else if (iter.getMonth() != this.selectedDate.getMonth())