SystemTray: Update example to follow the new behaviour of X11Systray class.

[EXAMPLES]
* BUG: SystemTray: Update example to follow the new behaviour of X11Systray class.
This commit is contained in:
gambas 2021-05-27 04:15:39 +02:00
parent e7a91689c3
commit 627afc0c90
3 changed files with 7 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,5 +1,4 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.6.90
Title=SystemTray
Startup=FMain
Icon=icon.png
@ -7,9 +6,11 @@ Version=1.0.0
Component=gb.image
Component=gb.gui
Component=gb.form
Component=gb.desktop
Component=gb.desktop.x11
Description="X11 System tray example.\n\nThis example shows how to create a system tray with the gb.desktop.x11 component."
TabSize=2
Translate=1
Language=fr
Vendor=Example
Packager=1
Translate=1

View file

@ -10,22 +10,16 @@ End
Public Sub Form_Open()
X11Systray.Show(dwgSystemTray.Handle)
X11Systray.Show(dwgSystemTray.Handle, dwgSystemTray.Background)
End
Static Public Sub X11Systray_Arrange()
FMain.ArrangeTray
End
Public Sub ArrangeTray()
Dim I As Integer
Dim X, Y, H As Integer
Debug
Debug X11Systray.Count
X = 2
Y = 2
For I = 0 To X11Systray.Count - 1
@ -44,21 +38,8 @@ Public Sub ArrangeTray()
End
' Public Sub DrawingArea1_Draw()
'
' Paint.DrawImage($hImage, 0, 0)
'
' End
Public Sub dwgSystemTray_Arrange()
Public Sub Form_Resize()
' Dim DH As Integer
'
' Paint.Begin(draSystemTray)
' DH = 1 + draSystemTray.H / $hImage.H
' Paint.DrawImage($hImage, 0, - DH, draSystemTray.W, draSystemTray.H + DH * 2)
' Paint.End
ArrangeTray
X11Systray.Move(0, 0, dwgSystemTray.Width, dwgSystemTray.Height)
End