Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

Trayicon troubles

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sebastian Kraft

Hello,

fiddling around with TTrayicon I discovered some problems.

1. is it possible to have a trayicon with transparent background? I created the icon from a png where the background was transparent but the icon in the panel shows a grey back.

2. How can I show this balloon thing?

regards,
Sebastian

Reply by email

Felipe Monteiro de Carvalho
to Sebastian Kraft
Sebastian Kraft wrote
1. is it possible to have a trayicon with transparent background? I created the icon from a png where the background was transparent but the icon in the panel shows a grey back.

Which fpc, laz and os version?

2. How can I show this balloon thing?

Use the following properties:

ShowBalloonHint, GetPosition, BalloonFlags, BalloonHint, BalloonTimeout, BalloonTitle

I think that GetPosition isn't implemented in all platforms. Test it.

Felipe Monteiro de Carvalho

Reply by email

Andrew Haines
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 8 lines
On Tue, Dec 9, 2008 at 7:03 PM, Felipe Monteiro de Carvalho > I think that GetPosition isn't implemented in all platforms. Test it. > Actually it is implemented for gtk2 and win32, so it should work.

I just implemented TGtk2WSCustomTrayIcon.ShowBalloonHint for gtk2 in r17771

Regards,

Andrew

Reply by email

Sebastian Kraft
to Felipe Monteiro de Carvalho: Which fpc, laz and os version? Use the following properties: ShowBalloonHint,…
Felipe Monteiro de Carvalho wrote
On Tue, Dec 9, 2008 at 6:07 PM, Sebastian Kraft
Show quoted text 5 lines
> 1. is it possible to have a trayicon with transparent background? > I created the icon from a png where the background was > transparent but the icon in the panel shows a grey back. Which fpc, laz and os version?

Lazarus svn, fpc 2.2.2, Kubuntu 8.10 with KDE 4.2 beta

Show quoted text 7 lines
> 2. How can I show this balloon thing? Use the following properties: ShowBalloonHint, GetPosition, BalloonFlags, BalloonHint, BalloonTimeout, BalloonTitle

Thanks! ShowBalloonHint did it....

Reply by email

Andrew Haines
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 11 lines
On Tue, Dec 9, 2008 at 7:35 PM, Andrew Haines wrote: > I just implemented TGtk2WSCustomTrayIcon.ShowBalloonHint for gtk2 in r17771 > Well ... this is already implemented in a cross-platform way in TCustomTrayIcon. The widgetset specific hint should only be implemented if there is a native ballon hint (my plan was to use it only for Windows XP)

As far as I know it is a native balloon hint. Conforming window managers will show the hint in a consistent manner with other apps.

Maybe a property can be added that forces the internal popup implementation to be used...

BTW does it work for you? I tested in gnome but I don't have kde.

Andrew

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho: Well ... this is already implemented in a cross-platform way in TCustomTrayIcon. The…

Well, your implementation doesn't work in my system (KDE 3.5), while the previous one does.

Unless there is a compeling argument to use the new implementation I propose to revert to the previous one.

I appreciate your effort to quick implement the feature, but it was somewhat missguided. To improve things I propose improving GetPosition for gtk2, I don't use strange bar positions, so testing is always welcome, and also improving the looks of the notifier component.

Felipe Monteiro de Carvalho

Reply by email

Andrew Haines
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 12 lines
Well, your implementation doesn't work in my system (KDE 3.5), while the previous one does. Unless there is a compeling argument to use the new implementation I propose to revert to the previous one. I appreciate your effort to quick implement the feature, but it was somewhat missguided. To improve things I propose improving GetPosition for gtk2, I don't use strange bar positions, so testing is always welcome, and also improving the looks of the notifier component.

I reverted the changes. At least it's in the history if in the future something changes. I wonder why it didn't work in kde.

afaict GetPosition is working correctly here since my tray area is at the top of the screen and the balloon shows correctly(after the revert).

Regards,

Andrew

Reply by email

Andrew Haines
to Felipe Monteiro de Carvalho: Well ... this is already implemented in a cross-platform way in TCustomTrayIcon. The…
Felipe Monteiro de Carvalho wrote 6 lines
Well ... this is already implemented in a cross-platform way in TCustomTrayIcon. The widgetset specific hint should only be implemented if there is a native ballon hint (my plan was to use it only for Windows XP)

Any objections to my improving the current balloon a bit? I see some issues with text that is too long. Also an indicator of the time left before it closes might be nice.

Regards,

Andrew

Reply by email

Felipe Monteiro de Carvalho
to Andrew Haines
Andrew Haines wrote
Any objections to my improving the current balloon a bit? I see some issues with text that is too long. Also an indicator of the time left before it closes might be nice.

Not at all, fell free to improve it =)

I beliave it is in the unit lcl/popupnotifier.pas

Felipe Monteiro de Carvalho

Reply by email