MaxGUI cross platformness

BlitzMax Forums/BlitzMax Programming/MaxGUI cross platformness

ozak(Posted 2006) [#1]
I'm having problems with buttons on OS X cutting of text that looks fine in Windows. If I change the button sizes, they become too large on windows.
Do I really have to do conditional sizes depending on the platform or does anyone have a sweet trick for this?

Thanks in advance


Perturbatio(Posted 2006) [#2]
I'd imagine conditional sizes are probably the best way.

I'd also imagine there's a slight size difference between the windows classic theme and XP theme as well. (there certainly is for window borders).


ImaginaryHuman(Posted 2006) [#3]
Presumably native buttons on OSX crop the text content automatically and windows doesn't. It's probably platform specific and part of the o/s not to do with MaxGUI, so you'll have to code your own workaround.


Brucey(Posted 2006) [#4]
Buttons on OSX need to be about 2 pixels higher and about 10 pixels longer than the equivalent sized button on win32.
Unlike REALbasic (where the controls on all platforms appear the same size), Max's OSX buttons don't actually fill the full dimensions you specify. If you don't believe me, grab images of a win32 button and an OSX button, and compare them.

I've tended to use a const which I apply to the dimension of the gadget I'm creating.... width + BUTTON_MOD
which is say, set to zero on win32 and 10 on OSX...

Also, you'll need to make things like TextField and ComboBox higher on OSX than win32 to get the bottom of g's and such like to appear. (unless of course you make the gadgets high enough anyway)

And then of course there's linux...... *sigh*

Best to experiment :-)


Mark Tiffany(Posted 2006) [#5]
Max's OSX buttons don't actually fill the full dimensions you specify. If you don't believe me, grab images of a win32 button and an OSX button, and compare them.

If that's true, then surely that's a bug in Max then? I'd expect a request for a 10 pixel by 10 pixel button to give me just that...


Grisu(Posted 2006) [#6]
Even under windows I have problems such as different THEMES people use will mess up your buttons + texts.

Life is hard, so why should coding be any easier... ;)