Closed Bug 345178 Opened 19 years ago Closed 18 years ago

Tab Preview is cut off (when resized) when using Classic theme.

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jasonb, Assigned: csthomas)

References

Details

(Keywords: fixed-seamonkey1.1a)

Attachments

(3 files, 1 obsolete file)

To reproduce: 1. Change browser.tabs.tooltippreview.width from the default 300 to 800. 2. Restart the browser. 3. Generate a preview of a page. Expected results: The entire page should be displayed in the tooltip canvas. Actual results: The right-hand side of the preview page is cut off. When using the Modern theme, everything works just fine and is resized as you'd expect, with nothing being cut off. This only happens when using the Classic theme. Assigning this to Chris since he implemented this originally and had been asking about it on MozillaZine. Now that we have a method of reproducing it, hopefully it can be corrected.
What OS theme are you using? What resolution is your screen set to? Trunk or branch? Is the tooltip not slightly more than 800px wide, or is the canvas too big? I can't reproduce this on trunk with Classic + XP Classic.
Ah, possibly the issue is the 40em max-width in popup.css?
Ah! Thank you for asking me those questions to narrow things down even more. I hadn't thought to troubleshoot the *OS* theme being used. > What OS theme are you using? If I use the XP theme "Windows XP" I see the problem. But if I use the theme "Windows Classic" then everything is fine. Further, it seems that I can narrow things down even more. It's the Appearance -> Windows and Buttons -> "Windows XP Style" that seems to be the culprit. (I can use the "Windows XP" OS theme, and change the Windows and Buttons appearance to "Windows Classic Style" and things are then fine. So - it's Seamonkey's Classic them with XP's "Windows XP Style" Windows and Button appearance setting (used by default by the "Windows XP theme".) > What resolution is your screen set to? That doesn't matter. I can set any resolution with the same thing happening. > Trunk or branch? Trunk. I'm attaching two screen captures. One with the working "Windows Classic" theme being used on the OS, the other with the non-working "Windows XP" OS them.
Attached image XP Classic theme that works. (deleted) —
Comment on attachment 229810 [details] XP default (new "Luna") theme that fails. That looks suspiciously like 40em to me ;-) Of course, we still want the max width to apply when tooltippreview is disabled.
Is there a quick userChrome.css method that can be used to override / test the 40em max-width hypothesis? If not, do you know the .jar file / patch containing popup.css that I could modify?
.tabbrowser-strip > tooltip { max-width: none; } should work.
That didn't help...
(In reply to comment #9) > That didn't help... > Try max-width: none !important;
Yes, that worked!
(In reply to comment #11) > Yes, that worked! > Are you able to test patches?
I can decompress .jars, edit files, and compress them again - but I don't have a compile environment.
Attached patch possible patch (obsolete) (deleted) — Splinter Review
This may work.
Attachment #230360 - Flags: superreview?(neil)
Attachment #230360 - Flags: review?(neil)
Comment on attachment 230360 [details] [diff] [review] possible patch >+ aPopup.setAttribute("tabpreview", "true"); >+ > var ctx; > try { > ctx = canvas.getContext("2d"); > } catch (e) { > return true; > } > > label.width = 0; Non-cairo builds don't do tab preview. (Set and clear the width and tabpreview in the same order for consistency.) >+tooltip[tabpreview="true"] { Nit: space at end of line >+ max-width: none: Nit: should be none; >+} >+ > .tooltip-label { Nit: your new rule should come after this rule, not before.
Attachment #230360 - Flags: superreview?(neil)
Attachment #230360 - Flags: superreview+
Attachment #230360 - Flags: review?(neil)
Attachment #230360 - Flags: review-
Comment on attachment 230360 [details] [diff] [review] possible patch >Index: mozilla/themes/classic/global/win/popup.css Actually browser.css might be a better place for this rule.
Attached patch patch v2 (deleted) — Splinter Review
Addresses review comments, also slightly improves behavior of tab preview for very small images.
Attachment #230360 - Attachment is obsolete: true
Attachment #232847 - Flags: review?(neil)
Attachment #232847 - Flags: review?(neil) → review+
Comment on attachment 232847 [details] [diff] [review] patch v2 Missing comment was my fault this time ;-) >+ if (img.naturalHeight < canvasH && img.naturalWidth < canvasW) { "<=" (I assume we can draw an H*W image on an H*W canvas, right?)
Comment on attachment 232847 [details] [diff] [review] patch v2 a=me for 1.1a (requested by CTho on IRC)
Attachment #232847 - Flags: approval-seamonkey1.1a+
Fixed on trunk and branch.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Unfortunately, this isn't fixed for me. With the 8/13-08 build, I still get my preview window cut off if I remove the CSS from comment 10 from my userChrome.css...
(In reply to comment #21) > Unfortunately, this isn't fixed for me. With the 8/13-08 build, I still get my > preview window cut off if I remove the CSS from comment 10 from my > userChrome.css... > Trunk? 1.8? Both?
Works for me in classic, browser.tabs.tooltippreview.width to 800px. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060814 SeaMonkey/1.1a
> Trunk? 1.8? Both? I'm seeing this in the trunk - I haven't tried anything else.
WFM - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060814 SeaMonkey/1.5a
Okay, after further troubleshooting on my end I've found that the native Classic theme actually does work now. My problem only exists when using the 3rd party, Classic-based, Eurynome theme (http://www.incognu.com/occ.html). Obviously something changed that this (and perhaps other) themes aren't taking advantage of. I will continue to use the userChrome setting for now - but is there something I can relay to the theme author that should be incorporated so that this can be functional?
(In reply to comment #26) >is there something I can relay to the theme author that should be incorporated >so that this can be functional? browser.css + +tooltip[tabpreview="true"] { + max-width: none; +}
Cheers - sorry for the inadvertant spam.
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: