[gnome-shell/datetime] Collapse two-pixel borders inside the table
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/datetime] Collapse two-pixel borders inside the table
- Date: Wed, 26 Jan 2011 19:13:48 +0000 (UTC)
commit bbd2b89df360a2e1f758ec762b58fb366ea354c3
Author: David Zeuthen <davidz redhat com>
Date: Wed Jan 26 14:10:34 2011 -0500
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 <davidz redhat com>
data/theme/gnome-shell.css | 9 +++++++++
js/ui/calendar.js | 6 ++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 5572a20..0598937 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 925a46f..e79702d 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())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]