BGHUDAppKit icon indicating copy to clipboard operation
BGHUDAppKit copied to clipboard

Radio Buttons in 2D Matrix Do Not Render Titles Correctly

Open mcdermj opened this issue 15 years ago • 1 comments

When using the procedure in Bug Report #7 to create a two dimensional matrix of radio buttons, only the first column of buttons renders the text correctly. The additional columns do not display any text at all when imagePosition is NSImageLeft, NSImageRight, or NSNoImage. You can see the text superimposed in weird ways when imagePosition is in NSImageBelow NSImageAbove and NSImageOverlaps. This suggests that the text frame for the control may not being calculated correctly when in a matrix. I noticed there is some code to fix up the y-plane coordinates, possibly there is an x-plane correction necessary as well.

HOW TO REPRODUCE:

Create a two-dimensional matrix of buttons (I'm using 3 columns, 4 rows). Change each button's image to NSRadioButton, and it's class to BGHUDButtonCell. Simulate the interface.

mcdermj avatar Feb 22 '10 10:02 mcdermj

Ah, good catch, I never tried doing multiple columns, oops. This is added.

timthedevguy avatar Feb 23 '10 20:02 timthedevguy