I want to enable Retina for one of my apps that uses FGSourceList with Retina Kit (or without)
I’ve got the icons in the list to be Retina enabled just fine but the Badge is giving me headaches.
As you can see on this image it looks terrible.
To begin with, I’m no good at drawing graphics so please bare with me here
In FGSourceList DrawBadge method I would think the following code is the code that needs to be altered somehow?
Don’t know where to start
// ################################### Bubble picture ##################################### \\\\
// Work out how long and wide the bubble needs to be to fit the number in and define the bubble picture to be 10 pixels wider
// and 6 pixels taller
g.TextSize = 11
g.Bold = true
bubble = new Picture( item.BadgeWidth, g.TextHeight + 1, 32 )
if selected = false then
bubble.Graphics.ForeColor = item.BadgeColor
bubble.Graphics.FillRect( 0, 0, bubble.Graphics.Width, bubble.Graphics.Height)
end if
// ##################################### Bubble mask ####################################### \\\\
// Fill the mask white
bubble.Mask.Graphics.ForeColor = &cFFFFFF
bubble.Mask.Graphics.FillRect(0, 0, bubble.Width, bubble.Height)
// Now draw the black rounded rectangle (that will allow the gradient to show through behind)
bubble.Mask.Graphics.ForeColor = &c000000
bubble.Mask.Graphics.FillRoundRect( 0, 0, bubble.Width, bubble.Height, 13, 13 )
// ##################################### Draw the number ##################################### \\\\
bubble.Graphics.Bold = true
bubble.Graphics.TextSize = 11
bubble.Graphics.TextFont = "Arial Bold"
Irrelevant part skipped
// Need to work out the width of the string
stringWidth = bubble.Graphics.StringWidth( str(numberToDraw) )
// Draw the number (we need to change the offset slightly when using Cocoa) - NEW 1.0.6
#if TargetCocoa
bubble.Graphics.DrawString( str(numberToDraw), (bubble.Width / 2) - ( stringWidth / 2 ), (bubble.Height/2) + (bubble.Graphics.TextSize/2) - 1 )
#else
bubble.Graphics.DrawString( str(numberToDraw), (bubble.Width / 2) - ( stringWidth / 2 ), bubble.Graphics.TextSize )
#endif
// ############################ Draw the bubble onto the passed Graphics object ##################### \\\\
g.DrawPicture( bubble, g.Width - bubble.Width - 5, (g.Height / 2) - (bubble.Height / 2) )
Any help appreciated!