First time toolbar layout incorrect (buttons too big)

VERIFIED FIXED

Status

()

P3
normal
VERIFIED FIXED
20 years ago
20 years ago

People

(Reporter: mikepinkerton, Assigned: mikepinkerton)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Assignee)

Description

20 years ago
In viewer, look at the toolbarTest1.xul example (url provided, also a menu item).

Notice that the icons on the first toolbar are stretched and are too large.
Reloading the page a 2nd time fixes this.

I only see this problem when a table is used w/in the first toolbar. Without the
table, I'm pretty sure the buttons have the correct sizes every time.

My opinion is that this is a layout or table bug, since the toolbars themselves
do no layout besides calling nsBlockFrame::Reflow().

Updated

20 years ago
Assignee: troy → pinkerton

Comment 1

20 years ago
If we're going to look at this I need a small HTML (preferably), or an XML
example
(Assignee)

Comment 2

20 years ago
viewer has one. it's in the menus and the url above.
(Assignee)

Updated

20 years ago
Assignee: pinkerton → troy
(Assignee)

Comment 3

20 years ago
I don't think this is an xptoolkit layout bug. It's either tables or block
frames.

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → WORKSFORME

Comment 4

20 years ago
Running this on Windows (NT specifically), I don't see the problem you describe.
What I see is is all the icons are the same size, and they all have broken
images displayed. When I resize the window the sizes are exactly the same
(Assignee)

Updated

20 years ago
Status: RESOLVED → REOPENED
(Assignee)

Comment 5

20 years ago
How are you building? client.mak? If so, the icons should all be in the correct
places. You can come see it on my machine if you want.

Reopening bug.

Updated

20 years ago
Assignee: troy → pinkerton
Status: REOPENED → NEW

Comment 6

20 years ago
I'm building using nglayout.mak just like I always do.

Please stop re-opening this bug. If it's a layout bug (and I believe it probably
is), make up a simple HTML sample that reproduces the problem and put that in
the bug...

Updated

20 years ago
Assignee: pinkerton → evaughan
OS: Mac System 8.5 → All

Updated

20 years ago
Resolution: WORKSFORME → ---

Comment 7

20 years ago
reassigning to evaughan to take a look at to rule out buttons as the cause.

Comment 8

20 years ago
clearing resolution

Comment 9

20 years ago
Ok after revisiting this bug I think I my have found the problem. It looks like
it might be in some of TitledButton image loading code. Taking a look.

Comment 10

20 years ago
*** Bug 3545 has been marked as a duplicate of this bug. ***

Comment 11

20 years ago
*** Bug 3608 has been marked as a duplicate of this bug. ***

Comment 12

20 years ago
Ok Titled buttons and images inside of toolbar come up the wrong size when first
loaded. And here is why.

1) Page comes up the image is not loaded yet so it defaults its size to
something. For titled buttons it is
30x30px which is why the button are stretched. For regular images its 0x0 so a
image in your bar doesn't
show up at all the first time.

2) When the image is done loading it calls a content changed on its content
node. This should cause a reflow
so the image or titledbutton can get the right size. The reflow never reaches
either one of them.

The following XUL caused the problem. The first time you open this the image
will not appear the second
and subsequent times it will work fine. Notice this example has no TitledButtons
in it.

<?xml version="1.0"?>
<?xml-stylesheet href="myxul.css" type="text/css"?>

<!DOCTYPE window>

<window xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="Startup()">

  <toolbox>
    <toolbar>
    <html:table width="100%" cellpadding=0 cellspacing=0><html:tr>

          <html:td>

              <html:img src="home.gif" />

   </html:td>


      </html:tr></html:table>

    </toolbar>
  </toolbox>

</window>

If you remove tool box it will work fine. So I think toolbox for some reason is
blocking the reflow.
(Assignee)

Updated

20 years ago
Assignee: evaughan → pinkerton
(Assignee)

Updated

20 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 13

20 years ago
Taking over control. It appears i'm not doing incremental reflow correctly in the
toolbox.

cc'ing hyatt since i know he say something similiar, and he might have to fix
similiar code.
(Assignee)

Comment 14

20 years ago
accepting bug.
(Assignee)

Updated

20 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 20 years ago20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 15

20 years ago
This was my problem all along. I wasn't being a good incremental reflow citizen
and advancing the reflow command list (not like i have a clue as to why i needed
to do that) in nsToolboxFrame::Reflow().

Toolbars and buttons now resize to the correct sizes when images finish loading.

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 16

20 years ago
Fixed in March 23rd Build.
You need to log in before you can comment on or make changes to this bug.