Closed Bug 1487021 Opened 4 years ago Closed 4 months ago

Improve the LW-background-box height calculation

Categories

(Thunderbird :: Toolbars and Tabs, defect)

defect
Not set
normal

Tracking

(thunderbird_esr91 unaffected)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 --- unaffected

People

(Reporter: Paenglab, Assigned: Paenglab)

References

Details

Attachments

(2 files, 2 obsolete files)

Bug 1486202 introduced at https://hg.mozilla.org/comm-central/rev/ff6f03d6611e#l3.31 a calculation of the background image box depending of the heights of the navigation-toolbox and the mail-toolbox. This works normally but with some edge cases this fails:

- Hiding/showing this toolbars doesn't trigger the calculation.
- When the main toolbar is hidden and the calendar tab's toolbar not then the toolbar has no background image.
- The stand-alone message window doesn't trigger a calculation because the calculation is done inside var TabsInTitlebar = {}.
Something for Aceman when he returns.
Flags: needinfo?(acelists)
What is asked from me here?
(In reply to :aceman from comment #2)
> What is asked from me here?

The three points in comment 0. If you could find a solution, especially for point 1 and 3. Point 2 is proably a very seldom edge case.
So what do I need to do to test/trigger that code to see the problem?
With this WE-theme I attached you see three TB logos. The one on bottom left should be always be in the corner.

In main window, when you hide the main toolbar, the logos stay where they are and don't move up to fit the smaller space.

In stand-alone window, when showing/hiding the menubar or switch "Text beside Icon" to "Icon and Text", it uses always the initial value and doesn't change the height of the LW-background-box which is behind the two toolboxes navigation-toolbox and mail-toolbox. On main window we use the var/function TabsInTitlebar / _layOutTitlebar() in msgMail3PaneWindow.js to calculate the dimensions and the height of the LW-background-box. But this isn't used in the stand-alone window. Could we apply this function to it too or is a new one needed for this window only?
Attached patch stand-alone.oatch.patch (obsolete) — Splinter Review
This fixes the stand-alone message issue by removing the navigation-toolbox and using only the mail-toolbox with all toolbars in it.

But unfortunately with this the menubar is shown twice in the toolbar context menu and the other toolbar menus.

Aceman, please could you look why this happens?
Assignee: nobody → richard.marti
Attachment #9024565 - Flags: feedback?(acelists)

Sorry, the patch doesn't apply anymore :(
I also find it strange that you need to move so many elements around. Why is it?

Flags: needinfo?(acelists)

Maybe we should rebase that one day and get it fixed.

Attached patch stand-alone.patch (obsolete) — Splinter Review

(In reply to :aceman from comment #7)

Sorry, the patch doesn't apply anymore :(

Now again. :)

I also find it strange that you need to move so many elements around. Why is it?

I had to move some code to apply only on main window and not on stand-alone window and renamed the files to better reflect the functionalities in them.

The stand-alone window works now -> fixed.
The main window doesn't re-calculate the height of the LW-background-box when changing the height of the toolboxes like showing/hiding the menu bar. -> this seems to be now the only issue we have.

Attachment #9024565 - Attachment is obsolete: true
Attachment #9024565 - Flags: feedback?(acelists)
Duplicate of this bug: 1604199
Attachment #9089704 - Attachment is obsolete: true
Target Milestone: --- → 97 Branch
Status: NEW → ASSIGNED

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c4c73c028f04
Remove the unneeded navigation-toolbox from stand-alone window. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.