[Mac] Combobox Icons aren't working

BlitzMax Forums/MaxGUI Module/[Mac] Combobox Icons aren't working

NoOdle(Posted 2012) [#1]
I had combobox icons working fine using generated code from LogicGui. I then resized the images and they stopped working so I resized the icon strip to the previous size but not this size wasn't working. I tried a fresh install of Blitzmax and MaxGUI but no change. The icon strip loads but only displays the last icon. Dimensions 96px X 8px PNG.

Any idea what could be causing this as I am totally stumped? Some sample code below:

	Global Combo1:TGadget = CreateComboBox(62,12,100,23,Window1,Null)
		Global Combo1_Icons:TPixmap = LoadPixmap( "color.png" )
		Global Combo1_Strip:TIconStrip = LoadIconStrip( Combo1_Icons )
		SetGadgetIconStrip( Combo1, Combo1_Strip )
		AddGadgetItem( Combo1,"None",GADGETITEM_DEFAULT )
		AddGadgetItem( Combo1,"Black",GADGETITEM_NORMAL,0 )
		AddGadgetItem( Combo1,"Brown",GADGETITEM_NORMAL,1 )
		AddGadgetItem( Combo1,"Red",GADGETITEM_NORMAL,2 )
		AddGadgetItem( Combo1,"Orange",GADGETITEM_NORMAL,3 )
		AddGadgetItem( Combo1,"Yellow",GADGETITEM_NORMAL,4 )
		AddGadgetItem( Combo1,"Green",GADGETITEM_NORMAL,5 )
		AddGadgetItem( Combo1,"Blue",GADGETITEM_NORMAL,6 )
		AddGadgetItem( Combo1,"Violet",GADGETITEM_NORMAL,7 )
		AddGadgetItem( Combo1,"Grey",GADGETITEM_NORMAL,8 )
		AddGadgetItem( Combo1,"White",GADGETITEM_NORMAL,9 )
		AddGadgetItem( Combo1,"Gold",GADGETITEM_NORMAL,10 )
		AddGadgetItem( Combo1,"Silver",GADGETITEM_NORMAL,11 )

Cheers!

Last edited 2012


jsp(Posted 2012) [#2]
If it was working before, did you change anything else?
Maybe an OS Update in the meantime or a newer XCode version which does things differently now?
Newer BlitzMax Version?

Is the 8px size a supported size for a mac combobox (at least it was working)?

May wipe out the .bmk temp folder in the project dir to get rid of older stuff which could harm the compile.
Have you turned on the quick build option in the IDE, try to turn it off.

Start with a new combobox adding one after another new icon, when does it stop working?
Does at least one item with one icon work?


NoOdle(Posted 2012) [#3]
Maybe an OS Update in the meantime or a newer XCode version which does things differently now?
Newer BlitzMax Version?

I doubt its that as it was working minutes before I resized the image.

Is the 8px size a supported size for a mac combobox (at least it was working)?

Not sure about the supported sizes, I just stuck to power of 2, most iphone stuff has this requirement so I assume its similar.

Start with a new combobox adding one after another new icon, when does it stop working?
Does at least one item with one icon work?

In the code above, the only item that displays its icon is the silver. It's only displaying the last icon in my icon strip.

I will try a blank new project today with a newly created icon strip to test this further. I didn't alter any code, just resized the image as it was too large and then it stopped working for all sizes!


NoOdle(Posted 2012) [#4]
Well that was frustrating... icons cant contain solid colours. On XP that worked fine, on the mac nothing was displayed. After A LOT of testing yesterday and today I found that the icons worked if they had more than one colour. A feint gradient overlay fixed the problem and the icons now show up.

This must a bug?


jsp(Posted 2012) [#5]
Maybe the solid color is considered as background and converted to transparent?


NoOdle(Posted 2012) [#6]
yeah maybe, just odd as each 8x8 or 16x16 pixel square was a different colour...