Opened 7 years ago

Closed 7 years ago

Last modified 7 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:
Has a Patch: no 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 7 years ago.
screenshot2.png (39.2 KB) - added by luroh 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by luroh

Attachment: screenshot1.png added

Changed 7 years ago by luroh

Attachment: screenshot2.png added

comment:1 Changed 7 years ago by luroh

Description: modified (diff)

comment:2 Changed 7 years ago by anevilyak

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

comment:3 Changed 7 years ago by anevilyak

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

comment:4 Changed 7 years ago by leavengood

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.

comment:5 in reply to:  4 Changed 7 years ago by luroh

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 Changed 7 years ago by leavengood

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 Changed 7 years ago by leavengood

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.