I have a tool bar which looks great on Mac OS X, using retina sized 64x64 icons (which scale down to 32x32). However, on Win32 builds the toolbar is gigantic.
I tried the following code at runtime to shrink the icons down to 32x32
Toolbar1.Open
#if TargetWin32
// try making all the icons 1/2 size on windows
for i as integer = 0 to me.Count-1
dim t as ToolItem = me.Item(i)
dim tb as ToolButton = ToolButton(t)
if tb.Icon <> nil then
dim p as picture = tb.icon
dim p2 as new Picture (p.width/2,p.height/2, 32) // use old-style picture or else it crashes!
p2.graphics.drawPicture p,0,0,p2.width,p2.height,0,0,p.width,p.height
p2.mask.graphics.drawPicture p.copyMask,0,0,p2.width,p2.height,0,0,p.width,p.height
tb.icon = p2
end if
next
#endif
But all I end up with is a tall toolbar with stretched pixellated images.
Is there any way to have a single toolbar item in my project that looks good on Windows too?
A neat thing about retina kit is that it handles windows and linux for you
It’s essentially the same effect as you described in your last post where you set @1x on the toolbar and then it gets changed at display time, but with rk it will handle the need for @2x on Mac and provide the image needed when not @2x.