[Project_owners] "x" to close nsIAlertsSevice.showAlertNotification()?

eric.jung at yahoo.com eric.jung at yahoo.com
Tue Feb 6 09:26:57 PST 2007

>That's a weird overlay. Do you overlay or override alert.xul?
Indeed, it is weird. I've worked on both overlay and override, and what you see is a lot of extraneous code leftover from the override creeping into the overlay. I'm aware that most of it is unnecessary for an overlay and have changed it to this:


Note I don't seem to be able to overlay the onload attribute for <window/> (i.e,. my function doesn't get called) so I instead use window.onload = function() {onFPAlertLoad();} in the XUL. This is a temporary workaround until I can figure out why the attribute overlay isn't working.

New screenshot is here:
I'll worry about the location of the alert box later. Right now I'm just trying to get rid of the ellipses.

>The style setting width explicitly on the label looks very wrong.
What would you suggest instead?

>I suggest looking at the style rules and the computed style for the label and its parent elements.
OK, I did that. Here's a screenshot of the DOM tree for alert.xul in domI:


The widths look ok:
alertNotification (<window/> element) has width of 957px
alertBox (<hbox/> element) has width of 952px
alertTextBox (<vbox/> element) has width of 900px
alertTitleLabel (<label/> element) has width of 900px
alertTextLabel (<label/> element) has width of 900px

I don't really know what else to do except not use nsIAlertService and instead use my own implementation. I'd really rather not do that. By what mechanism does Gecko decide how/when to clip text and use ellipses instead? Any other ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070206/db200047/attachment.html 

More information about the Project_owners mailing list