Fix bug 462490 - Today pane -> 'new event' icon is defect (regression). r=mschroeder
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 05 Nov 2008 10:32:58 +0100
changeset 1013 c73d43a0de7cff411017776d28bab1eeffb2b9d5
parent 1012 00698db7a05201035a598f495faadae83f8d519b
child 1014 bb6ac5c7b2883252326ec4243406d66c60031fc8
push idunknown
push userunknown
push dateunknown
reviewersmschroeder
bugs462490
Fix bug 462490 - Today pane -> 'new event' icon is defect (regression). r=mschroeder
calendar/base/content/today-pane.xul
calendar/base/themes/pinstripe/today-pane.css
calendar/base/themes/winstripe/today-pane.css
--- a/calendar/base/content/today-pane.xul
+++ b/calendar/base/content/today-pane.xul
@@ -179,21 +179,20 @@
                  </hbox>
                 </stack>
               </modebox>
             <vbox flex="1"
                   ondraggesture="nsDragAndDrop.startDrag(event, calendarCalendarButtonDNDObserver);"
                   ondragover="nsDragAndDrop.dragOver(event, calendarCalendarButtonDNDObserver);"
                   ondragdrop="nsDragAndDrop.drop(event, calendarCalendarButtonDNDObserver);">
               <toolbar id="agenda-toolbar" iconsize="small">
-                <toolbarbutton id="calendar-new-event-button"
+                <toolbarbutton id="todaypane-new-event-button"
                                mode="mail"
                                iconsize="small"
                                orient="horizontal"
-                               class="cal-toolbarbutton-1"
                                label="&calendar.newevent.button.label;"
                                tooltiptext="&calendar.newevent.button.tooltip;"
                                oncommand="agendaListbox.createNewEvent(event)"/>
              </toolbar>
              <popup id="agenda-menu" onpopupshowing="if (event.target == event.currentTarget) { agendaListbox.buildAgendaPopupMenu(this) }"/>
              <vbox id="agenda-menu-box" hidden="true">
                <menuitem label="&calendar.context.modifyorviewitem.label;"
                          accesskey="&calendar.context.modifyorviewitem.accesskey;"
--- a/calendar/base/themes/pinstripe/today-pane.css
+++ b/calendar/base/themes/pinstripe/today-pane.css
@@ -161,24 +161,35 @@
    display: none;
 }
 
 #agenda-toolbar {
   border: none;
   padding: 1px;
 }
 
-#calendar-new-event-button {
+#todaypane-new-event-button {
   -moz-user-focus: normal;
 }
 
-#calendar-new-event-button > .toolbarbutton-text {
+#todaypane-new-event-button > .toolbarbutton-text {
  -moz-padding-start: 5px;
 }
 
+#todaypane-new-event-button {
+  list-style-image: url("chrome://calendar/skin/toolbar-small.png");
+  -moz-image-region: rect(0px 24px 24px 0px);
+}
+#todaypane-new-event-button:active {
+  -moz-image-region: rect(24px 24px 48px 0px);
+}
+#todaypane-new-event-button[disabled="true"] {
+  -moz-image-region: rect(48px 24px 72px 0px);
+}
+
 #agenda-listbox {
   -moz-user-focus: normal;
   border: none;
 }
 
 agenda-checkbox-richlist-item {
   -moz-binding: url("chrome://calendar/content/agenda-listbox.xml#agenda-checkbox-richlist-item");
   -moz-user-focus: normal;
--- a/calendar/base/themes/winstripe/today-pane.css
+++ b/calendar/base/themes/winstripe/today-pane.css
@@ -165,24 +165,37 @@
   -moz-margin-end: 0px; /* override toolkit's default value */
 }
 
 #agenda-toolbar {
   border: none;
   padding: 1px;
 }
 
-#calendar-new-event-button {
+#todaypane-new-event-button {
   -moz-user-focus: normal;
 }
 
-#calendar-new-event-button > .toolbarbutton-text {
+#todaypane-new-event-button > .toolbarbutton-text {
  -moz-padding-start: 5px;
 }
 
+#todaypane-new-event-button {
+  list-style-image: url("chrome://calendar/skin/toolbar-small.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+}
+#todaypane-new-event-button[disabled="true"],
+#todaypane-new-event-button[disabled="true"]:hover,
+#todaypane-new-event-button[disabled="true"]:hover:active {
+  -moz-image-region: rect(32px 16px 48px 0px);
+}
+#todaypane-new-event-button:hover {
+  -moz-image-region: rect(16px 16px 32px 0px);
+}
+
 #agenda-listbox {
   -moz-user-focus: normal;
 }
 
 agenda-checkbox-richlist-item {
   -moz-binding: url("chrome://calendar/content/agenda-listbox.xml#agenda-checkbox-richlist-item");
   -moz-user-focus: normal;
 }