Button cosmetics under MacOSX

Kevin Altis wrote:

Argh, I had a spacer that I missed. Another test showed 7 pixels is needed.
This probably needs more in-depth testing of all controls with
recommendations on space for each side and trying to match the Apple Human
Interface Guidelines as much as possible. Yes it is annoying you need
platform-specific code.

How are you defining that 7 pixels space? I dint' do comrehensive
testing at all, only tested what I neededa tht time, which was a bunch
of buttons all next to each other, and 4 pixels all around worked fine,
which means that there were always at least 8 pixels between any two
buttons. That sounds like your 7 pixels (except I wanted to put the same
on all sides, and 6 (3X2) was not enough so I needed 8 (4X2).

If you've found that you need 7 + 7 anywhere, we're really getting ugly.

In any case, I would hope that aqua has a predictable maximum box that
it draws for a given control, and if it can be figured out what that box
is, that's what sizers should use. This sure sounds simple, but it's
obviously not. Oh well....

-Chris

ยทยทยท

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

From: Chris Barker

Kevin Altis wrote:

> Argh, I had a spacer that I missed. Another test showed 7
pixels is needed.
> This probably needs more in-depth testing of all controls with
> recommendations on space for each side and trying to match the
Apple Human
> Interface Guidelines as much as possible. Yes it is annoying you need
> platform-specific code.

How are you defining that 7 pixels space? I dint' do comrehensive
testing at all, only tested what I neededa tht time, which was a bunch
of buttons all next to each other, and 4 pixels all around worked fine,
which means that there were always at least 8 pixels between any two
buttons. That sounds like your 7 pixels (except I wanted to put the same
on all sides, and 6 (3X2) was not enough so I needed 8 (4X2).

If you've found that you need 7 + 7 anywhere, we're really getting ugly.

In any case, I would hope that aqua has a predictable maximum box that
it draws for a given control, and if it can be figured out what that box
is, that's what sizers should use. This sure sounds simple, but it's
obviously not. Oh well....

One way of more easily seeing what is going on is to set the background
color to something that sticks out. For example, try:

somecontrol.SetBackgroundColour('lime green')

This also shows that on the Mac that the background color is not the same
part of the control as you would expect from Windows and GTK and that might
be a bug; the foreground color has a related issue. This also nicely shows
issues with compound controls on *all* platforms because only the main
window of the compound control gets changed, which again, might be a bug.

If you don't want to roll your own test app, just fire up the PythonCard
widgets sample and you can quickly change all of widgets with one button
click.

As I mentioned before, you also have to click/select the various controls
because the selected state often has a larger area than the unselected
state. I think after looking at this some more that WXMAC is in need of some
tweaking on this issue.

ka