Commit Graph

146 Commits

Author SHA1 Message Date
Abou Al Montacir
d3f0f0ee86 GTK3: Fixed handling of scroll event.
Scrolling was not correctly handled due to error in the logic of
handling the scrolling event.

This fix is related to #21067.
2024-02-11 10:27:48 +01:00
Abou Al Montacir
e5ba0c58f1 GTK3: Fixed access violation issue in Gtk3Page.
The widget was freed and assigned nil pointer before it was unreferenced
which may lead to occasional access violation on application shutdown.

This fix is related to #40713.
2024-02-08 13:00:58 +01:00
Abou Al Montacir
b44cf28194 GTK3: Enabled resizing notebook children after insertion.
This allows fixing some problems but it is probably just a workaround.

This fix is related to #40713.
2024-02-07 21:54:51 +01:00
Abou Al Montacir
8da1763be3 GTK3: Enable showing hot key in page control widgets caption.
We store the raw caption in the `Text` field and convert ampersands
(`&`) to underscores (`_`) before using `set_markup_with_mnemonic` to
update the label text while honoring the hot key definition.

NB: The underscore will be drawn only if user hits `alt` key which is
a Gnome/Gtk3 feature.

This fix is related to #40713.
2024-01-31 11:53:05 +01:00
Abou Al Montacir
1019007853 GTK3: Fixed selected item text returned by ComboBox Text property.
We need to use `GtkEntry` for comboboxes with `has_entry = True` and
set the `column_id` property.

Closes #40706
2024-01-24 19:40:50 +01:00
Abou Al Montacir
fb3002163e GTK3: Improved initial size of created windows by setting constraints. 2023-12-09 14:18:36 +01:00
Abou Al Montacir
bfc786c46c GTK3: Fixed handling widget focus when csNoFocus is used.
Closes: #40037.

When the widget has `csNoFocus` set, we don't set focus on it.
2023-11-28 22:08:15 +01:00
Abou Al Montacir
3256ff9246 GTK3: Fixed setting cursor on widgets.
Closes: #40374. Thanks To: Anton Kavalenka.

When the widget doesn't have a window, we fall back to parent's one.
2023-11-24 19:59:54 +01:00
mattias
f9709f6d59 lcl: gtk3: clean up 2023-08-05 11:10:16 +02:00
mattias
aa8213a2b4 lcl: gtk3: fixed getting style constraints 2023-07-31 13:30:36 +02:00
mattias
7eb893ea23 lcl: gtk3: fixed gtk warnings with docked forms 2023-07-31 13:30:36 +02:00
Juha
e65a102527 Remove unit Laz_AVL_Tree, a copy of unit AVL_Tree. Not needed with FPC 3.2.x. 2023-07-07 17:39:03 +03:00
Juha
211d95da17 LCL: Use TLCLHandle instead of a redefined LCLType.THandle or TLCLIntfHandle. Deprecate them. 2023-07-03 11:17:01 +03:00
Juha
69d50106c9 LCL-GTK3: Fix wrong types found by -Sy compiler option. Some were wrong, some needed a typecast. 2023-07-02 10:03:22 +03:00
Abou Al Montacir
58645a39f4 GTK3: Fixed crash on Win64 after recent changes on GTK3 hints.
Seems that on Win64, `FHintControl` is not always a valid `TWinControl`
class instance.
2023-06-25 20:31:16 +02:00
Abou Al Montacir
06ec2750ca GTK3: Passed handle of hint win control to WS inside hint data pointer.
Closes #40331.

GTK3 WS needs to get that handle in order to retrieve the parent window
which need to be set as transient of the newly created popup window.

This is a required by GTK3 documentation as one can see in
  https://docs.gtk.org/gtk3/method.Window.set_transient_for.html

This patch needs to touch common LCL code, but `HintData` files does
not seem to be really used.
2023-06-24 13:59:53 +00:00
Abou Al Montacir
a739298781 GTK3: Updated Gtk3 set types after recent changes in git2pas.
Now that `gir2pas` is able to generate correctly set types for C enums,
we migrated more C enums to set type.

This required some changes in the Gtk3 WS code.
2023-06-05 22:38:41 +00:00
Abou Al Montacir
a5c67a943f GTK3: Updated Gdk3 set types after recent changes in git2pas.
Now that `gir2pas` is able to generate correctly set types for C enums,
we migrated more C enums to set type.

This required some changes in the Gtk3 WS code.
2023-06-04 18:02:11 +00:00
Abou Al Montacir
e42a3c7df7 GTK3: Migrate TGtkSortType to enumeration type.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkSortType` is defined as
an enumeration type. This commit fixes those errors.
2023-06-01 23:21:44 +00:00
Abou Al Montacir
22c6d6658f GTK3: Migrate TGtkTreeViewColumnSizing to enumeration type.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkTreeViewColumnSizing` is
defined as an enumeration type. This commit fixes those errors.
2023-06-01 23:21:44 +00:00
Abou Al Montacir
7eedf76e73 GTK3: Migrate TGdkScrollDirection to enumeration type.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGdkScrollDirection` is
defined as an enumeration type. This commit fixes those errors.
2023-06-01 23:21:44 +00:00
Abou Al Montacir
9c0c7bfd1c GTK3: Migrate TGdkModifierType to enumeration set.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGdkModifierType` is defined
as an enumeration set type. This commit fixes those errors.

Please note the following comments in the changed code:
```pascal
//TODO: This is hand written just to give the direction we need to go.
//TODO: We need to make git2pas generate similar code for bitfields.
2023-06-01 13:43:46 +00:00
Abou Al Montacir
20539aaeb5 GTK3: Migrate TGtkStateFlags to enumeration.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGtkStateFlags` is
defined as an enumeration type. This commit fixes those errors.
2023-05-31 22:47:26 +00:00
Abou Al Montacir
54979c4ae2 GTK3: Migrate TGtkResponseType to enumeration.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGtkResponseType` is defined
as an enumeration type. This commit fixes those errors.
2023-05-30 17:04:29 +02:00
Abou Al Montacir
fa222b9d1f GTK3: Migrate some scrolling related C enum types to enumeration types.
In Gtk3 WS code, variables of type Integer were used instead of ones
of relevant enumeration type.
This leads to compilation error now that `TGtkTextDirection`,
`TGtkAccelFlags`, `TGtkDirectionType` , `TGtkOrientation` and
`TGtkDestDefaults` are defined as an enumeration type.
This commit fixes those errors.
2023-05-30 12:16:18 +00:00
Abou Al Montacir
7f8eec753e GTK3: Migrate TGdkEventMask to enumeration set.
In Gtk3 WS code, integers were used instead of enumeration values.
This leads to compilation error now that `TGdkEventMask` is defined
as an enumeration set type. This commit fixes those errors.

Please note the following comments in the changed code:
```pascal
//TODO: This is hand written just to give the direction we need to go.
//TODO: We need to make git2pas generate similar code for bitfields.
```
2023-05-29 13:20:48 +00:00
Abou Al Montacir
49572afe43 GTK3: Migrate GtkConnectFlags to enumeration type.
In Gtk3 WS code, 0 was used instead of `G_CONNECT_DEFAULT`.
This leads to compilation error now that `GtkConnectFlags` is defined
as an enumeration type. This commit fixes those errors.
2023-05-28 15:21:43 +00:00
Abou Al Montacir
10ab7f6f12 GTK3: Migrate GtkPolicyType to enumeration type.
Now, `git2pas` produces enumeration types when translating C enums.
This implies changes in WS support files as Pascal enumeration types
are not compatible with integers and require explicit cast.

In order to avoid explicit casts, some internal functions API were
changed so that the code remains clean without unneeded type casts.
2023-05-28 11:58:14 +02:00
Željan Rikalo
235809a870 Gtk3: fixed TPanel constraints. Patch by Anton Kavalenka. issue #39925 2022-09-22 12:45:51 +02:00
Juha
8def460511 LCL-GTK3: Fix regression with form decoration on Wayland. Issue #39898, patch by Anton Kavalenka. 2022-09-17 18:03:34 +03:00
Juha
02115d373b LCL-GTK3: Turn WriteLn into DebugLn. Make sure they compile. Cleanup. 2022-01-20 19:30:40 +02:00
Juha
f120539d03 LCL-GTK3: Show applications better under KWin. Issue #39367, patch by Anton Kavalenka. 2021-09-30 17:30:27 +03:00
juha
7b60b545a7 LCL-GTK3: Fire TLabel.OnClick also when inside a TGroupBox. Issue #39035, patch by Anton Kavalenka.
git-svn-id: trunk@65313 -
2021-06-27 09:01:21 +00:00
juha
587b7a8582 LCL-GTK3: Fix TEdit width, show hint when mouse stops. Issues #39036,#39039, patch by Anton Kavalenka.
git-svn-id: trunk@65302 -
2021-06-24 17:40:18 +00:00
juha
4a7413fce7 LCL-GTK3: Prevent a crash in Manjaro Linux. Issue #38914, patch by Anton Kavalenka.
git-svn-id: trunk@65298 -
2021-06-23 18:19:15 +00:00
juha
a610d1108f LCL-GTK3: Fix window position flags poDefault, poDefaultPosOnly etc. Issue #39029, patch by Anton Kavalenka.
git-svn-id: trunk@65287 -
2021-06-22 05:55:43 +00:00
juha
c2a25b1805 LCL-GTK3: Show form's title bar in all window managers with border style bsSingle. Issue #39013, patch by Anton Kavalenka.
git-svn-id: trunk@65260 -
2021-06-17 22:42:24 +00:00
juha
13f7dbd914 LCL-GTK3: Fix PageControl with some tabs hidden. Issue #39010, patch by Anton Kavalenka.
git-svn-id: trunk@65253 -
2021-06-16 21:52:18 +00:00
juha
a1e67490c9 LCL-GTK3: Make ListView handle selection change and generate LCL message. Issue #39007, patch by Anton Kavalenka.
git-svn-id: trunk@65250 -
2021-06-16 21:21:14 +00:00
juha
dadb9c7e8d LCL-GTK3: Display Listview icons in vsIcon mode. Issue #38942, patch by Anton Kavalenka.
git-svn-id: trunk@65215 -
2021-06-11 07:07:09 +00:00
juha
1d89d15e0a LCL-GTK3: Fix MouseUp events, display Listview icons in vsIcon mode. Issues #38941 and #38942.
git-svn-id: trunk@65191 -
2021-06-10 20:17:21 +00:00
juha
7959d2ab7c LCL-GTK3: Make Listview display icons in list mode. Issue #38914, patch by Anton Kavalenka.
git-svn-id: trunk@65120 -
2021-05-21 09:50:57 +00:00
mattias
7b2e9d9bbd lcl gtk3: undo visible check, issue #38886
git-svn-id: trunk@65112 -
2021-05-13 18:16:14 +00:00
juha
c91719848f LCL-GTK3: Fix TrackBar better. Issue #38620, patch by Anton Kavalenka.
git-svn-id: trunk@65109 -
2021-05-13 07:07:18 +00:00
mattias
a62a8da59f lcl gtk3: fixed gtk warnings
git-svn-id: trunk@65104 -
2021-05-10 17:17:39 +00:00
mattias
8a28cfb7aa lcl: gtk3: less hints
git-svn-id: trunk@65103 -
2021-05-10 14:38:34 +00:00
mattias
5e8a217e0d lcl: gtk3: less hints
git-svn-id: trunk@65102 -
2021-05-10 14:08:08 +00:00
mattias
331f647184 lcl: gtk3: less hints
git-svn-id: trunk@65100 -
2021-05-10 13:51:57 +00:00
mattias
7879c790a4 lcl: gtk3: less hints
git-svn-id: trunk@65099 -
2021-05-10 13:38:54 +00:00
juha
8891a9d277 LCL-GTK3: Fix TrackBar. Issue #38620, patch by Anton Kavalenka.
git-svn-id: trunk@65090 -
2021-05-07 09:07:09 +00:00