timthedevguy / BGHUDAppKit

* BGHUDAPPKIT is no longer under development by me, I hope that the community will keep it alive and going as I no longer have time to dedicate to the project** The missing HUD controls. Please scroll down to read the readme file for an important notice concerning the future of BGHUDAppKit. Note that there are multiple versions available, 10.5+, 10.6.7, and now 10.7. As soon as I learn how I'll make these all one code base if possible.
http://www.binarymethod.com/
312 stars 57 forks source link

Radio Buttons in 2D Matrix Do Not Render Titles Correctly #21

Open mcdermj opened 14 years ago

mcdermj commented 14 years ago

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.

timthedevguy commented 14 years ago

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