Closed Bug 852496 Opened 7 years ago Closed 7 years ago

The image for the delete button in the Event/Task Edit Dialog is messed up.

Categories

(Calendar :: Lightning: SeaMonkey Integration, defect)

x86
Windows 7
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philip.chee, Assigned: philip.chee)

Details

Attachments

(1 file)

TL;DR: ID clash between the SeaMonkey #button-delete and the Lightning #button-delete.

The delete button in calendar-event-dialog.xul has an id of "button-delete"
One of the stylesheets referenced in calendar-event-dialog.xul is:
chrome://messenger/skin/primaryToolbar.css

Unfotunately in SeaMonkey mailnews, primaryToolbar.css contains styles for our "button-delete" on the 3pane window main toolbar.

I have a WIP patch working.
In SeaMonkey mailnews, the primaryToolbar.css contains styles for the SaMonkey "button-delete" on the 3pane window main toolbar. In order to prevent the SeaMonkey version of primaryToolbar.css messing up the #button-delete toolbarbutton in the Lightning dialog, we need to make the rules more specific. e.g.

> -#button-delete {
> +#button-delete.cal-event-toolbarbutton,

The SeaMonkey versions of primaryToolbar.css (windows, mac) generally have rules for :hover and :hover:active as well so I've added these rules to calendar-event-dialog.css where (I think it's necessary).

I've only tested this on Windows7 as I don't have access to Linux or Mac OSX.

> @@ -49,16 +49,17 @@ lightning.jar:

>  % style chrome://global/content/customizeToolbar.xul chrome://lightning/skin/lightning-toolbar.css
> +% style chrome://calendar/content/calendar-event-dialog.xul chrome://communicator/skin/communicator.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}

SeaMonkey consolidates common button styles somewhere central like communicator.css, so we need to apply the styles from this file to the Lightning Event/Task Edit Dialog.
Attachment #728633 - Flags: review?(richard.marti)
Comment on attachment 728633 [details] [diff] [review]
Patch v1.0 make #button-delete styles more specific.

Review of attachment 728633 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the comments addressed.

Are the list-style-image definitions needed for SM? They are defined for .cal-event-toolbarbutton globally (on gnomestripe even with !important) and on TB I see no reason to define it again.

::: calendar/base/themes/gnomestripe/dialogs/calendar-event-dialog.css
@@ +138,5 @@
>   *   delete button
>   *-------------------------------------------------------------------*/
>  
>  #button-delete.cal-event-toolbarbutton {
> +    list-style-image: url("chrome://calendar/skin/calendar-event-dialog-toolbar.png");

This isn't needed.

@@ +151,5 @@
>      -moz-image-region: rect(24px 408px 48px 384px);
>  }
>  
> +toolbar[iconsize="small"] #button-delete.cal-event-toolbarbutton {
> +    list-style-image: url("chrome://calendar/skin/calendar-event-dialog-toolbar-small.png");

Again this and the other list-style-image definitions in pinstripe/winstripe aren't needed.
Attachment #728633 - Flags: review?(richard.marti) → review+
> Are the list-style-image definitions needed for SM? They are defined for
> .cal-event-toolbarbutton globally (on gnomestripe even with !important) and
> on TB I see no reason to define it again.

They are needed because otherwise the #button-delete image from the SeaMonkey primaryToolbar.css wins out. Which totally doesn't match the rest of the icons in the toolbar there.
Then it's okay like the patch is now.
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/f9dfb9e44b73

I have totally no idea what is the version of Lightning trunk so I'll pick the highest version number available (2.4)
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.4
You need to log in before you can comment on or make changes to this bug.