diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2025-11-27 19:28:03 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2025-11-27 21:43:01 +0100 |
| commit | 36a656e6188f227956dbdf12bf5fda8be1ea7985 (patch) | |
| tree | e32bf7d43d4ea7d6466db72ba1d6f0d29f75f059 /libgtk_kylix/GTKForms.pas | |
| parent | 90db8b6652f73ddc335922d3a7c593878d83c45e (diff) | |
| download | tuxcmd-36a656e6188f227956dbdf12bf5fda8be1ea7985.tar.xz | |
Fix panel separator resizing
Diffstat (limited to 'libgtk_kylix/GTKForms.pas')
| -rw-r--r-- | libgtk_kylix/GTKForms.pas | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/libgtk_kylix/GTKForms.pas b/libgtk_kylix/GTKForms.pas index 0dc1691..3b159de 100644 --- a/libgtk_kylix/GTKForms.pas +++ b/libgtk_kylix/GTKForms.pas @@ -66,13 +66,11 @@ type // Some basic types private FOnClose: TCloseEvent; FOnCloseQuery: TCloseQueryEvent; - FOnResize: TNotifyEvent; FOnShow: TNotifyEvent; FCaption: string; FOnDestroy: TNotifyEvent; - FDeleteEventSignalHandlerID: gulong; - FSizeAllocateSignalHandlerID: gulong; - FShowSignalHandlerID: gulong; + FDeleteEventSignalHandler: gulong; + FShowSignalHandler: gulong; function GetWindowPosition: TWindowPosition; function GetResizeable: boolean; function GetWindowTypeHint: TGDKWindowTypeHint; @@ -97,7 +95,6 @@ type // Some basic types property Visible write SetVisible default False; property OnClose: TCloseEvent read FOnClose write FOnClose; property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery; - property OnResize: TNotifyEvent read FOnResize write FOnResize; property OnShow: TNotifyEvent read FOnShow write FOnShow; property Caption: string read FCaption write SetCaption; property WindowPosition: TWindowPosition read GetWindowPosition write SetWindowPosition; @@ -277,20 +274,14 @@ begin if Assigned(TCustomGTKForm(user_data).FOnShow) then TCustomGTKForm(user_data).FOnShow(TCustomGTKForm(user_data)); end; -procedure TCustomGTKForm_size_allocate(widget : PGtkWidget; allocation : PGtkAllocation; user_data : gpointer); cdecl; -begin - if Assigned(TCustomGTKForm(user_data).FOnResize) then TCustomGTKForm(user_data).FOnResize(TCustomGTKForm(user_data)); -end; - constructor TCustomGTKForm.Create(AOwner: TComponent); begin inherited Create(AOwner); FOnClose := nil; FOnCloseQuery := nil; FOnDestroy := nil; - FDeleteEventSignalHandlerID := 0; - FSizeAllocateSignalHandlerID := 0; - FShowSignalHandlerID := 0; + FDeleteEventSignalHandler := 0; + FShowSignalHandler := 0; FCaption := ''; FAccelGroup := gtk_accel_group_new; Screen.AddForm(Self); @@ -300,18 +291,16 @@ destructor TCustomGTKForm.Destroy; begin Screen.RemoveForm(Self); if Assigned(FOnDestroy) then FOnDestroy(Self); -// if FDeleteEventSignalHandlerID > 0 then g_signal_handler_disconnect(PGObject(FWidget), FDeleteEventSignalHandlerID); -// if FSizeAllocateSignalHandlerID > 0 then g_signal_handler_disconnect(PGObject(FWidget), FSizeAllocateSignalHandlerID); -// if FShowSignalHandlerID > 0 then g_signal_handler_disconnect(PGObject(FWidget), FShowSignalHandlerID); +// if FDeleteEventSignalHandler > 0 then g_signal_handler_disconnect(PGObject(FWidget), FDeleteEventSignalHandler); +// if FShowSignalHandler > 0 then g_signal_handler_disconnect(PGObject(FWidget), FShowSignalHandler); if not Application.Terminated then gtk_widget_destroy(FWidget); inherited Destroy; end; procedure TCustomGTKForm.ConnectDefaultSignals; begin - FDeleteEventSignalHandlerID := g_signal_connect_data(PGObject(FWidget), 'delete-event', TGCallback(@TCustomGTKForm_delete_event), Self, nil, G_CONNECT_DEFAULT); - FSizeAllocateSignalHandlerID := g_signal_connect_data(PGObject(FWidget), 'size-allocate', TGCallback(@TCustomGTKForm_size_allocate), Self, nil, G_CONNECT_DEFAULT); - FShowSignalHandlerID := g_signal_connect_data(PGObject(FWidget), 'show', TGCallback(@TCustomGTKForm_show), Self, nil, G_CONNECT_DEFAULT); + FDeleteEventSignalHandler := g_signal_connect_data(PGObject(FWidget), 'delete-event', TGCallback(@TCustomGTKForm_delete_event), Self, nil, G_CONNECT_DEFAULT); + FShowSignalHandler := g_signal_connect_data(PGObject(FWidget), 'show', TGCallback(@TCustomGTKForm_show), Self, nil, G_CONNECT_DEFAULT); end; procedure TCustomGTKForm.SetVisible(Value: Boolean); |
