Hi,
I'm in progress on Retina-fying my application. There are 2 places where I have
issues with icons in a menu and I'm not sure if it's me, RealStudio or MBS:
1. Add application icon to popup menu:
dim thePopup as NSPopUpButtonMBS = me.NSPopUpButtonMBS
for currentApp = 0 to numberOfMailApps
dim theItem as NSMenuItemMBS = thePopup.itemAtIndex(CurrentApp)
theItem.Image = GetApplicationIcon(SupportedMailApps(currentApp)))
next
where GetApplicationIcon is:
Private Function GetApplicationIcon(theBundleIdentifier as String) As NSImageMBS
dim theApp as FolderItem = LaunchServicesFindApplicationForInfoMBS("",
theBundleIdentifier,"")
dim theIcon as Picture
if RetinaScaleFactor = 1 then
theIcon = theApp.IconMBS(16)
else
theIcon = theApp.IconMBS(32)
end if
dim FinalImage as new NSImageMBS(theIcon)
Return FinalImage
End Function
The icons are available at retina, but they are drawn in double size and not
with retina resolution.
2. Add icon for desktop etc. folder. Should the following work:
Private Function getIconFromFolder(theFolder as FolderItem) As Picture
dim theIconM as new IconMBS(theFolder)
dim theFamily as IconFamilyMBS = theIconM.IconFamily
dim theIcon as Picture
if RetinaScaleFactor = 1 then
theIcon = theFamily.Small32BitData
theIcon.Mask = theFamily.Small8BitMask
else
theIcon = theFamily.Large32BitData
theIcon.Mask = theFamily.Large8BitMask
end if
Return theIcon
End Function
This returns only 32x32 pixel icons. I need icons for desktop, home and
documents folder.
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info