On 2/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >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:
>
> http://pastebin.mozilla.org/3603
>
Please inline the code for archival purposes.
> <window id="alertNotification"
> 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.
>
The root element of XUL overlays must be <xul:overlay>. There's no
processing being done on the root element, that's why your onload
attribute doesn't work. You should be using addEventListener in
overlays anyway (to avoid clashing with other overlays).
> >The style setting width explicitly on the label looks very wrong.
> What would you suggest instead?
>
Dunno, set the width of the window and have everything else flex.
> >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:
>
> http://img293.imageshack.us/img293/9789/cap2tb8.png
>
> 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
>
The label's properties are the most interesting. If it indeed has a
width of 900px (check the Box object pane in the DOMi as well; also
set outlines to all the elements to see their real dimensions) with
little padding and margin, then it's weird. Try to get a minimized
testcase.
My guess though, is that the actual width of the label is less than
900px. Hard to say why without being able to check this in the DOMi.
Nickolay
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners