Closed Bug 176767 Opened 22 years ago Closed 19 years ago

Menus at left edge of screen are shifted to the right slightly (Firefox File menu misaligned)

Categories

(Core :: XUL, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: martijn.martijn)

References

()

Details

Attachments

(2 files, 1 obsolete file)

Steps to reproduce:
1. Maximize Mozilla or Phoenix.
2. Open the File menu.

Result: The menu opens, but it's several pixels to the right of where it should
be.  This looks ugly.  There seems to be an invisible margin at the left edge of
the screen where Mozilla avoids putting menus.

You can also see this bug if you right-click at the left edge of the screen.
This bug has existed for a while, but it was recently made more visible by the
removal of toolbar grippies (bug 112534), which makes the bug also happen with
the menu bar.
*** Bug 201703 has been marked as a duplicate of this bug. ***
Jesse, now that the toolbar grippies are back in Moz, shouldn't this be turned
into a Phoenix-only bug?
(adding a MZo thread discussing this)
No, because it also happens with context menus in a maximized Mozilla window.
Summary: file menu misaligned (menus never appear at left edge of screen) → Menus at left edge of screen are shifted (phoenix file menu misaligned)
Just adding my comments that, since Mozilla Thunderbird has switched to the new
toolkit, that it also happens in there. (Nothing unexpected, but so far only the
Mozilla suite and Mozilla Firebird are mentioned--and the summary itself
mentions only "Phoenix" [with a small "p"]--so I just thought I'd throw this in.)
Changing summary to mention Firefox instead of Phoenix.
Summary: Menus at left edge of screen are shifted (phoenix file menu misaligned) → Menus at left edge of screen are shifted (Firefox File menu misaligned)
This is very annoying, especially when making themes. Please, if possible change it.
this looks very unprofessional... fix it pls!
6 months later and still not fixed...
a clear ff 1.1 blocker! ;-)
you gonna ship 1.1 with this bug?! shame on you!!!
*** Bug 296049 has been marked as a duplicate of this bug. ***
Could the Summary be changed from:

Menus at left edge of screen are shifted (Firefox File menu misaligned)

to

Menus at left edge of screen are shifted to the right slightly (Firefox File
menu misaligned)

so as to include the word 'right'.
Flags: blocking-aviary1.1?
Summary: Menus at left edge of screen are shifted (Firefox File menu misaligned) → Menus at left edge of screen are shifted to the right slightly (Firefox File menu misaligned)
WFM and as far as I remember always has.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050529
Firefox/1.0+ ID:2005052914
Nope, still doesn't work.  Default theme.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8b2) Gecko/20050531
Firefox/1.0+
Well, removing this code makes it work for me:
   // inset the screen by 5px so that menus don't butt up against the side
  const PRInt32 kTrimMargin = 0;
  screenLeft += kTrimMargin;
  screenTop += kTrimMargin;
  screenRight -= kTrimMargin;
  screenBottom -= kTrimMargin;
  screenWidth -= 2 * kTrimMargin;
  screenHeight -= 2 * kTrimMargin;
It was checked in here:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/layout/xul/base/src&command=DIFF_FRAMESET&file=nsMenuPopupFrame.cpp&rev1=1.80&rev2=1.81&root=/cvsroot
Attached patch patch (obsolete) — Splinter Review
Mike, can this code safely be removed, or does it still serve a purpose?
There is a smallish issue with the patch: In WindowsXP you get a dropshadow on
the menu (or should get, but that's bug 282059). With this patch it the
dropshadow gets hidden behind the right edge, when a popup menu appears at the
right edge.
(In reply to comment #16)
> There is a smallish issue with the patch: In WindowsXP you get a dropshadow on
> the menu (or should get, but that's bug 282059). With this patch it the
> dropshadow gets hidden behind the right edge, when a popup menu appears at the
> right edge.

Does this mean that the menu is so far against the right side of the screen that
you cannot see its shadow (because the menu's right edge is flush against the
right of the screen)? If so, I actually think that would be OK--it's what other
Windows programs seem to do if you can get one of their menus to open right
along the right side. (HINT: If you want to see this for yourself, do it with a
program that uses "normal" Windows menus like Notepad or most Windows
programs--or if you insist on doing it with IE or Windows Explorer, try it with
the Favorites menu* not something like Tools or Help, unless you move them off
the screen and access them with the keyboard. Otherwise they have a peculiar
habit of aligning to the left edge of the parent menu bar item instead of the
left, which no other program seems to do.)    *for some reason, this menu
behaves differently from all the others--both those to the left of it and to the
right of it, maybe because it has to custom-draw a lot of things; in any case,
it's actually the one menu that mimics the behavoir other applications seem to
exhibit

Unless, of course, this also means that Mozilla doesn't display the *bottom*
half of the shadow even when it has space to do so.
Attached patch patch v.2Splinter Review
Yes, previous patch didn't give room for the winxp dropshadow at the right and
the bottom, so that wasn't any good. This patch does.
Ideally, there should be a patch that checks if the OS supported dropshadows
and positioned the dropshadow accordingly, but that's not something that I'm
able to do. I think this is good enough (at least for now).
Attachment #185014 - Attachment is obsolete: true
Attachment #185130 - Flags: review?(roc)
Comment on attachment 185130 [details] [diff] [review]
patch v.2

please add a comment explaining what the magic number '3' means
Attachment #185130 - Flags: superreview+
Attachment #185130 - Flags: review?(roc)
Attachment #185130 - Flags: review+
Attachment #185324 - Flags: approval1.8b3?
Attachment #185324 - Flags: approval1.8b3? → approval1.8b3+
Boris, Robert or someone else, could you check this in please?
updated my DeerPark Alpha1 with the final patch... works and looks great! thx
Assignee: hyatt → martijn.martijn
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 248205 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.1?
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: