Closed Bug 722758 Opened 12 years ago Closed 12 years ago

Print button is misaligned in the Mail & News toolbar with the Modern theme

Categories

(SeaMonkey :: Themes, defect)

defect
Not set
trivial

Tracking

(seamonkey2.7 wontfix, seamonkey2.8 fixed, seamonkey2.9 fixed, seamonkey2.10 fixed)

VERIFIED FIXED
seamonkey2.8
Tracking Status
seamonkey2.7 --- wontfix
seamonkey2.8 --- fixed
seamonkey2.9 --- fixed
seamonkey2.10 --- fixed

People

(Reporter: rsx11m.pub, Assigned: iannbugzilla)

References

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce:

 - open the Mail/News window (new or existing profile)
 - customize the toolbar to add the "Print" button anywhere
 - this looks fine while using the Default theme
 - switch to Modern theme, now it is too low and misaligned

> Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20111221 SeaMonkey/2.6.1
> Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120131 SeaMonkey/2.9a1
Attached image Appearance on Windows 7
with Windows Classic desktop theme.
That's actually a quite recent regression. I've created a new profile with 2.1 and added the Print button to the Mail/News toolbar - looks fine even with the Modern theme. From there I went to 2.5b4 and the Print button was still there and well aligned.

Now, when going from 2.5b4 to 2.6.1, the Print button disappeared from the previously customized toolbar, and when adding it back from the customization palette, it shows the misalignment as described. Thus, the regression happened somewhere between 2.5 and 2.6.
Ian, possibly related to bug 676991 "Move toolbar print button to utilityOverlay"? The patch in attachment 553967 [details] [diff] [review] made quite a few changes to the style files and would fit the time frame.
We switched from using:
#button-print {
  list-style-image: url("chrome://communicator/skin/icons/btn1.gif");
  -moz-image-region: rect(34px 49px 67px 0);
}

To
#print-button {
  list-style-image: url("chrome://communicator/skin/icons/common.png");
  -moz-image-region: rect(0 42px 39px 0);
}

The height changed from 33px to 39px.

Hg Blame says:
http://hg.mozilla.org/comm-central/rev/a508ab7862d2
author	Ian Neal <iann_cvs@blueyonder.co.uk>
Bug 676991 - Move toolbar print button to utilityOverlay r=neil/standard8
I'm measuring six pixels off in the screen shot, so this would match that difference. Bottom line, the image is too big now, or could it just be cropped?

On a side note, it looks (at least visually) correct in the main toolbar of the navigator window.
In a naive approach based on Phil's comment #4, I've changed all -moz-image-region: rect(0 * 39px *); to rect(3px * 36px *); in communicator.css, which indeed resolves the problem for the mail/news toolbar. However, given that print-button is shared among windows now (the aim of bug 676991 to start with) it looks horribly misaligned in the main-window toolbar with that change. Thus, adjusting this globally doesn't seem to be the right way to go... :-\
This patch:
* overrides the print icon for mailnews windows

Hopefully when there is a new modern theme the icons in all components will be the same size as they are for classic plus there will be small versions for mailnews.
Assignee: nobody → iann_bugzilla
Status: NEW → ASSIGNED
Attachment #593257 - Flags: review?(philip.chee)
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

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

Cancelling review request for the time being.

::: suite/themes/modern/messenger/primaryToolbar.css
@@ +264,5 @@
>  #button-junk[disabled="true"] {
>    -moz-image-region: rect(544px 199px 577px 150px) !important;
>  }
>  
> +/* To workaround the mailnews icons are 33px tall and have no small versions */

We *were* using the small print buttons from chrome://communicator/skin/icons/common-small.png !
http://hg.mozilla.org/comm-central/rev/a508ab7862d2#l20.46

Could you put these back? Thanks.
Attachment #593257 - Flags: review?(philip.chee) → feedback-
> +toolbar[iconsize="small"] > #print-button[disabled="true"],
> +#print-button[disabled="true"] {
> +  -moz-image-region: rect(3px 168px 36px 126px) !important;
What style are your overriding with !important here?
(In reply to Philip Chee from comment #9)
> > +toolbar[iconsize="small"] > #print-button[disabled="true"],
> > +#print-button[disabled="true"] {
> > +  -moz-image-region: rect(3px 168px 36px 126px) !important;
> What style are your overriding with !important here?

iirc it's the hover:active rules (it's like this in all files). We don't use not:([disabled="true"]) etc
(In reply to Philip Chee from comment #8)
> We *were* using the small print buttons

Other than the "Stop" button (apparently due to the same global definition as the "Print" button now) and changes in the spacing, the icons stay the same in the main Mail & News as well as the composition window when switching to small icons, so it seems to be more consistent to not use small icons for print-button either (and likely so for the stop-button, but that may be a separate bug).
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

OK. I'll give the patch a spin.
Attachment #593257 - Flags: feedback- → review?
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

The print button is much better aligned. Compared to 2.0.14 it's about a couple of pixels lower. Moving the -moz-image-region 2 px down seems to work better. e.g.

-  -moz-image-region: rect(3px 42px 36px 0); 
+  -moz-image-region: rect(5px 42px 38px 0);

r=me with the 2px shift at your discretion.
Attachment #593257 - Flags: review? → review+
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

(In reply to Philip Chee from comment #13)
> +  -moz-image-region: rect(5px 42px 38px 0);

I've patched 2.7 with this modification and it looks good to me as well.
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

It would be good to get this into 2.8 and 2.9 too
Attachment #593257 - Flags: approval-comm-beta?
Attachment #593257 - Flags: approval-comm-aurora?
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

http://hg.mozilla.org/comm-central/rev/2896ec0b8c06
Attachment #593257 - Attachment description: Temporary workaround until new icons arrive → Temporary workaround until new icons arrive [Checked in: Comment 16]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.10
Attachment #593257 - Flags: approval-comm-beta?
Attachment #593257 - Flags: approval-comm-beta+
Attachment #593257 - Flags: approval-comm-aurora?
Attachment #593257 - Flags: approval-comm-aurora+
Comment on attachment 593257 [details] [diff] [review]
Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]

http://hg.mozilla.org/releases/comm-aurora/rev/a4536456e92a
http://hg.mozilla.org/releases/comm-beta/rev/458dad0ffd8f
Attachment #593257 - Attachment description: Temporary workaround until new icons arrive [Checked in: Comment 16] → Temporary workaround until new icons arrive [Checked in:comm-central Comment 16 comm-aurora/beta Comment 17]
Target Milestone: seamonkey2.10 → seamonkey2.8
Verified fixed on Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a2) Gecko/20120208 SeaMonkey/2.9a2, thanks!
Status: RESOLVED → VERIFIED
Blocks: 849359
No longer blocks: 849359
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: