You would use Application.DockItem wouldn’t you? This page reads like you can draw anything you want to your application’s dock icon with the graphics object (more than just the red number indicator.)
That kind of works… you are “drawing” on a 1024 x 1024 image (regardless of what the LR says)
and then that image is downsized to match whatever size your dock requires…
So you have to draw REALLY huge, and hope you don’t lose too much detail when it downsizes…
ie. Textsize for a string would be in the 300 - 600 size range
dim g as graphics=app.DockItem.Graphics
g.ForeColor=&cff0000
g.fillrect 0,0,g.width,g.height
g.ForeColor=&c0000ff
g.drawline 0,0,g.Width,g.Height // this line is too "thin" to appear
app.DockItem.UpdateNow
[quote=180826:@Dave S]That kind of works… you are “drawing” on a 1024 x 1024 image (regardless of what the LR says)
and then that image is downsized to match whatever size your dock requires…
So you have to draw REALLY huge, and hope you don’t lose too much detail when it downsizes…
ie. Textsize for a string would be in the 300 - 600 size range
dim g as graphics=app.DockItem.Graphics
g.ForeColor=&cff0000
g.fillrect 0,0,g.width,g.height
g.ForeColor=&c0000ff
g.drawline 0,0,g.Width,g.Height // this line is too "thin" to appear
app.DockItem.UpdateNow
[/quote]
You could try the other way. Draw at 64x64 or close to the screen size, then scale it up to feed to DockItem which in turn will scale it down. But that way you normally should not have lines too thin to render.
[quote=180826:@Dave S]That kind of works… you are “drawing” on a 1024 x 1024 image (regardless of what the LR says)
and then that image is downsized to match whatever size your dock requires…
So you have to draw REALLY huge, and hope you don’t lose too much detail when it downsizes…
ie. Textsize for a string would be in the 300 - 600 size range
dim g as graphics=app.DockItem.Graphics
g.ForeColor=&cff0000
g.fillrect 0,0,g.width,g.height
g.ForeColor=&c0000ff
g.drawline 0,0,g.Width,g.Height // this line is too "thin" to appear
app.DockItem.UpdateNow
[/quote]
Fwiw, if you figure out how big your text should be at 128x128, you can just multiply by the difference in size.
dim ratio = g.width / 128
G.fontsize = 12 * ratio
That ratio will also be good for figuring out anything else that needs to scale, and if apple ever returns a different size, it’ll just work. The icon wasn’t always 1024x1024 for instance.