Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8829 closed bug (fixed)

font size change causes menu text truncating when it isn't needed

Reported by: luroh Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by luroh)

  1. Open Preferences -> Appearance -> Fonts and increase the 'Plain font' size to 14.
  2. Open ActivityMonitor and press the 'Settings' menu and note that the menu text reads 'Sett...s...'.

  1. Move the mouse pointer down the menu and note that it changes to the correct text, 'Settings...'.

Similar menu text corruption can be found in other applications as well, e.g. in CharacterMap and GLTeapot.

Attachments (2)

screenshot1.png (40.7 KB ) - added by luroh 12 years ago.
screenshot2.png (39.2 KB ) - added by luroh 12 years ago.

Download all attachments as: .zip

Change History (9)

by luroh, 12 years ago

Attachment: screenshot1.png added

by luroh, 12 years ago

Attachment: screenshot2.png added

comment:1 by luroh, 12 years ago

Description: modified (diff)

comment:2 by anevilyak, 12 years ago

Component: - GeneralKits/Interface Kit
Owner: changed from nobody to axeld

comment:3 by anevilyak, 12 years ago

Note: have verified with luroh that hrev44458 is not responsible, this dates back to Alpha 3 or earlier.

comment:4 by leavengood, 12 years ago

Summary: font size change causes menu text corruptionfont size change causes menu text truncating when it isn't needed

And in this case you aren't even changing the menu font, just the normal font, eh?

So it is almost like the menu text rendering is truncating the text (hence the ellipsis) because it thinks there is not enough room. But it is weird that it then looks right when hovered. Checking the code for MenuItem I see that it does truncate in the middle if it thinks there is not enough room. I suspect something is wonky in BMenuItem::GetContentSize(). But this isn't corruption of the menu text, just truncating, so I'm changing the Summary.

in reply to:  4 comment:5 by luroh, 12 years ago

Replying to leavengood:

And in this case you aren't even changing the menu font, just the normal font, eh?

Correct. Increasing the 'Plain font' size somehow affects also the menus.

comment:6 by leavengood, 12 years ago

Resolution: fixed
Status: newclosed

I'm not exactly sure why setting the main font bigger caused this to show up, but it seems to just be a good old off-by-one error. Should be fixed in hrev44466.

comment:7 by leavengood, 12 years ago

With Rene's help I dug into this more and fixed another part of this bug in hrev44467. What was fixed there is why changing the main font caused the truncation to appear.

Note: See TracTickets for help on using tickets.