Closed Bug 351117 Opened 18 years ago Closed 18 years ago

Padding problems with back/forward buttons on Linux

Categories

(Firefox :: Toolbars and Customization, defect)

2.0 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2

People

(Reporter: pkasting, Assigned: mconnor)

References

Details

(Keywords: fixed1.8.1, Whiteboard: [Fx2 theme change])

Attachments

(2 files, 1 obsolete file)

I think the fix for bug 347470 may have caused this, at least partially...

The back and forward buttons currently have two problems on Linux.

First, the icons aren't padded properly on the right, so the bevels on hover/click draw 6px away on the left but 0px away on the right.  This looks goofy.

Second, in Icons + Text mode, the area outside this padding is generally clickable to bring up the dropdown, which is bizarre.  I have reopened bug 350590 about this already, but that may have been the wrong move; maybe that was a slightly different bug.

Image clearly demonstrating both of these coming shortly.
Attached image Both problems
Here's the promised image.
Flags: blocking-firefox2?
Bug 347470 should not have caused anything, because it makes the css less redundant and puts a bunch of special cases in one place and fixing the horizontal spacing issue. Later theme patches have removed many of the special cases, and it is likely that bug 347447 makes this brokenness of the back/forward buttons more visible.

We can probably add more padding just for gtk2 to fix the first issue. The second issue.. I haven't been able to reproduce. Clicking on the edges of the buttons generally does not seem to give me the dropdown.
It might be appropriate to add the padding for non-GTK2 as well, if it makes the buttons more targetable.  I know several people have complained that the apparent targetable area of the buttons has been reduced.  (Of course, you can't tell what the actual targetable area is on Windows now, because there are no bevels.)

As for reproducing, I was running a current branch build on Ubuntu Breezy, GNOME, Human theme.  If all else fails you can stop by Google and I'll demo the bug :D
Flags: blocking-firefox2? → blocking-firefox2+
-> myk, since he's the main Linux holdout right now.
Assignee: nobody → myk
Whiteboard: [Fx2 theme change]
I took a closer look at all the buttons, and it looks like the home button is the only one with a reasonable amount of padding (4px on top, 5px elsewhere).  The others all have the following variable amounts (top x right x bottom x left):

Stop: 4 x 6 x 5 x 4
Reload: 4 x 6 x 5 x 4
Forward: 4 x -2 x 5 x 4
Back: 4 x -2 x 5 x 4

So the Back and Forward buttons obviously have a special problem, but the differences in left and right padding on the others are fairly noticeable, too.  Looking to see what's causing the problem...

Status: NEW → ASSIGNED
Attached patch patch v1: fixes problem (obsolete) — Splinter Review
This patch fixes the first problem on Linux in both LTR and RTL modes.  I'm testing it on Windows now to make sure it doesn't regress anything there.

I can't reproduce the second problem.  Perhaps it has since been fixed by another checkin?
Attachment #237023 - Flags: review?(mconnor)
(In reply to comment #6)
> This patch fixes the first problem on Linux in both LTR and RTL modes.  I'm
> testing it on Windows now to make sure it doesn't regress anything there.

This doesn't change the stop or reload buttons, so do they all have that "6 px right, 4 px left" padding now?

> I can't reproduce the second problem.  Perhaps it has since been fixed by
> another checkin?

I doubt it; I suspect there's something that's particular to my setup.  I can try and test with your patch at some point in the next few days to see if I can still reproduce.
> This doesn't change the stop or reload buttons, so do they all have that "6 px
> right, 4 px left" padding now?

Yes, they still have that problem.  It looks like this is a different problem from the one causing the back and forward button horkage, however.  I took a look at the Toolbar.png image being used for the buttons, and it looks like the problem is that the image regions have uneven built-in padding.

For example, the stop and reload images icons have two pixels of right padding and no left padding.  The house icon, on the other hand, has a single pixel of padding on both the left and the right.

So the house button correctly appears with five pixels of padding on either side of the icon, while the stop and reload buttons appear with six pixels of padding on the right and four on the left.

Top and bottom padding is less problematic.  The images all seem to have no padding on top and one pixel on the bottom, which is why their buttons all appear with 4 pixels of padding on the top and five on the bottom.  They'd probably look better with the same amount of padding on both sides, but this one-pixel difference is more subtle, and at least it seems to be consistent across icons.
Crap, the first patch creates too much space on Windows.  Ok, here's a patch that makes the changes be Linux-only.

Also, I filed bug 351623 on the problem of uneven padding within the images themselves.
Attachment #237023 - Attachment is obsolete: true
Attachment #237053 - Flags: review?(mconnor)
Attachment #237023 - Flags: review?(mconnor)
(In reply to comment #9)
> Crap, the first patch creates too much space on Windows.  Ok, here's a patch
> that makes the changes be Linux-only.

Does that mean that the actual click targets of the buttons on windows are oddly shaped (wider on one side than the other)?

The interactions here seems complex to me, and it's disturbing that we're needing to do what amount to completely different (non-symmetric) things to get the buttons properly spaced and centered on different OSes.
> Does that mean that the actual click targets of the buttons on windows are
> oddly shaped (wider on one side than the other)?

Yes, I believe it does mean that.


> The interactions here seems complex to me, and it's disturbing that we're
> needing to do what amount to completely different (non-symmetric) things 
> to get the buttons properly spaced and centered on different OSes.

I hear talk that we're going to bring bevels back to Windows and drop the pill-shaped drop marker.  If true, those changes will obviate the need for this fix.

Otherwise, I agree with you that it's disturbing to be making these changes for Linux only, but we already started down that road when we reverted theme changes in bug 347416 to go back to native styling for toolbar buttons on Linux, which brought back the bevels on that platform only.

But perhaps there's a way to make the padding symmetric on Windows as well, even if we don't bring bevels back on that platform.
Attachment #237053 - Flags: review?(mconnor)
new images + cleaned up CSS should, as Myk said, have fixed this bug.  Marking as such, please reopen and remove the fixed1.8.1 keyword if this is not the case.
Assignee: myk → mconnor
Status: ASSIGNED → NEW
Keywords: fixed1.8.1
This is indeed fixed (or, really, INVALID...)
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: