Modify

Opened 13 years ago

Closed 7 years ago

#9627 closed defect (fixed)

PATCH: fixed menu item height

Reported by: falkb Owned by:
Priority: normal Component: MenusPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.12

Description

I saw the mainnav menu item height was not correct with my Trac 0.12.2, and I don't have custom styles installed. It's displayed in FF and IE like this:

This patch fixes that:

Attachments (2)

badHeight.jpg (9.5 KB) - added by falkb 13 years ago.
IE9-Win7x64.png (2.2 KB) - added by Ryan J Ollos 13 years ago.

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by falkb

Attachment: badHeight.jpg added

comment:1 Changed 13 years ago by Ryan J Ollos

I did some testing with Trac 0.11 and the value 14.75px gives the best results on Ubuntu 10.04 with FF 3.6.24. I doubt that will be true across all browser and OS combinations. Is there a better way to go about this than explicitly setting a value for height in the CSS?

comment:2 in reply to:  1 ; Changed 13 years ago by anonymous

Replying to rjollos:

14.75px

How is a 3/4 pixel possible?

comment:3 in reply to:  2 Changed 13 years ago by Ryan J Ollos

Replying to anonymous:

How is a 3/4 pixel possible?

I'm not sure, but if I zoom in many times on the page, then I reach a text size in which I can see the mainnav height change as the height is changed by a fraction of a pixel. I assume the mainnav height is just scaled by the zoom factor, so the fractional value has an effect at a high zoom factor.

Maybe that doesn't matter at all, but my point was, using a fixed pixel value for mainnav height might not be the right solution here. I can't say, I know very very little about CSS and these page layout issues.

comment:4 Changed 13 years ago by falkb

For a while I played around with px, em, percent and that padding-top setting in different zoom levels of FF. I cannot find the one and only size. Sometimes it was too big, sometimes to small.

After all my impression is it all depends on the font of the menu item and its certain size in each zoom level plus a fixed scaled offset. The font height depends on the font which may be different on other styles or OS.

Best would be to take over the size of overlayed menu items, though I don't know how to do so.

comment:5 Changed 13 years ago by Ryan J Ollos

Owner: changed from Catalin BALAN to Ryan J Ollos
Status: newassigned

Yeah, I see what you mean. Your patch seems like a step in the right direction. Maybe we can get it into the repository after I finish dealing with #7399.

comment:6 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [11167]) Fixes #9627: Applied patch from falkb to adjust mainnav height to better match the height of the buttons for a default Trac installation. In the future, some proper CSS modifications might provide a better fix for this issue, but we don't know a better solution at the moment.

Changed 13 years ago by Ryan J Ollos

Attachment: IE9-Win7x64.png added

comment:7 Changed 13 years ago by Ryan J Ollos

In Trac 0.12.2, the alignment looks correct now in FF9 on Win7-x64, but not in IE9:

comment:8 Changed 13 years ago by falkb

Since we're talking about the height of the bar behind the menu, could a simple artifice help?: Instead of setting a fixed height, insert one single letter that should be overlayed by the foreground menu in all cases. That letter (using the same font like the menu item words) would fit the height as well, automatically.

comment:9 Changed 13 years ago by Ryan J Ollos

I have no idea if that will work, but it sounds like a clever way to fix this if you can make it work. Maybe you could even just set the color of the letter to be the same as the background so that it is effectively invisible, regardless of a menu overlay.

comment:10 Changed 13 years ago by falkb

Resolution: fixed
Status: closedreopened

although I haven't got a clue when looking at this superfish stuff... hope dies at last

comment:11 Changed 8 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted
Status: reopenednew

comment:12 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Height adjusted for Trac 1.2 in r16733.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.