Recent

Author Topic: Gtk3 becomes default widgetset on Linux  (Read 1949 times)

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 213
    • http://www.lazarus.freepascal.org
Gtk3 becomes default widgetset on Linux
« on: July 02, 2026, 06:12:17 pm »
Gtk3 is now the default widgetset on Linux in the Lazarus main branch.

zeljko

  • Hero Member
  • *****
  • Posts: 1980
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Gtk3 becomes default widgetset on Linux
« Reply #1 on: July 02, 2026, 06:36:38 pm »
There's announcement on gtk subforum too : https://forum.lazarus.freepascal.org/index.php/topic,74333.0.html

Mobius1

  • New Member
  • *
  • Posts: 15
Re: Gtk3 becomes default widgetset on Linux
« Reply #2 on: July 03, 2026, 01:51:35 am »
Thanks for the UI update!!

But wouldn't it be better to just skip GTK3 and go up straight to GTK4 or above? I mean... less work for more results...

Could you explain the reason if possible, thanks.

dsiders

  • Hero Member
  • *****
  • Posts: 1647
Re: Gtk3 becomes default widgetset on Linux
« Reply #3 on: July 03, 2026, 01:55:19 am »
Thanks for the UI update!!

But wouldn't it be better to just skip GTK3 and go up straight to GTK4 or above? I mean... less work for more results...

Could you explain the reason if possible, thanks.

Have you written the GTK4 widget code? Cause no one else has.

CTS

  • Newbie
  • Posts: 4
Re: Gtk3 becomes default widgetset on Linux
« Reply #4 on: July 03, 2026, 02:18:43 am »
Yes! Thanks you for the hard work  :)

CTS

  • Newbie
  • Posts: 4
Re: Gtk3 becomes default widgetset on Linux
« Reply #5 on: July 03, 2026, 02:58:50 am »
Thanks for the UI update!!

But wouldn't it be better to just skip GTK3 and go up straight to GTK4 or above? I mean... less work for more results...

Could you explain the reason if possible, thanks.

QT and licensing , no thanks.
GTK 2.1 and later are LGPL  :)

jeremiah

  • New Member
  • *
  • Posts: 25
Re: Gtk3 becomes default widgetset on Linux
« Reply #6 on: July 03, 2026, 04:15:45 am »
I have been testing the GTK3 in the trunk for several days now on XFCE and tried a variety of window mangers and themes but the scrollbars just are not correct. Two finger scroll and I fly to the bottom of a 5000 line file in one swipe. The scroll buttons are not working either. I can grab the scrollbar itself and move. I have Lazarus compiled with GTK3 also and it exhibits the same behavior.

What am I missing here?? I'm stumped.

Thaddy

  • Hero Member
  • *****
  • Posts: 19388
  • Glad to be alive.
Re: Gtk3 becomes default widgetset on Linux
« Reply #7 on: July 03, 2026, 07:21:53 am »
No problems with scrolling: set the smallchange property to a higher value.
There is nothing wrong with scrolling when properly configured.
Tested Linux86_64 Gtk3 Laz trunk, FPC trunk. Acer laptop with touch screen.
« Last Edit: July 03, 2026, 07:24:06 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

robert rozee

  • Sr. Member
  • ****
  • Posts: 400
Re: Gtk3 becomes default widgetset on Linux
« Reply #8 on: July 03, 2026, 07:24:42 am »
Gtk3 is now the default widgetset on Linux in the Lazarus main branch.

when will a release version of FPC be made available (via sourceforge) that supports this? or have you moved all the GTK-specific code to reside entirely in the Lazarus package so that the existing FPC 3.2.2 release can be used?


cheers,
rob   :-)

zeljko

  • Hero Member
  • *****
  • Posts: 1980
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Gtk3 becomes default widgetset on Linux
« Reply #9 on: July 03, 2026, 08:42:02 am »
Yes, gtk3 bindings used by lazarus are in lcl/interfaces/gtk3/gtk3bindings

Thaddy

  • Hero Member
  • *****
  • Posts: 19388
  • Glad to be alive.
Re: Gtk3 becomes default widgetset on Linux
« Reply #10 on: July 03, 2026, 09:35:33 am »
I can confirm the most recent GTK3 also works with Freepascal 3.2.3/4rc1 probably 3.2.2 too but I can't test that without an install. Lazarus and Freepascal are different entities. The GTK3 interface does not rely on compiler features newer than 3.2.2.
objects are fine constructs. You can even initialize them with constructors.

Jonax

  • Jr. Member
  • **
  • Posts: 55
    • Jonax stuff
Re: Gtk3 becomes default widgetset on Linux
« Reply #11 on: July 03, 2026, 01:20:42 pm »
Great news!

I will spawn a VM and try this immediately..

 :)

robert rozee

  • Sr. Member
  • ****
  • Posts: 400
Re: Gtk3 becomes default widgetset on Linux
« Reply #12 on: July 03, 2026, 04:36:56 pm »
Yes, gtk3 bindings used by lazarus are in lcl/interfaces/gtk3/gtk3bindings

excellent. just a couple more questions, which may be a little difficult to answer...

i believe there are currently at least two 'releases' of FPC 3.2.2 in existence: the 'official' one from sourceforge that contains source code specific to GTK1 and GTK2, and a 'debian' one being distributed by the debian folks that has been modified such that it (a) may contain source code specific to GTK3 but that (b) has had any source code specific to prior versions of GTK purged.

Q1 - going forward, will releases of lazarus be able to work with both (official and debian's) releases of FPC 3.2.2?

Q2 - going forward, will releases of lazarus (for linux) ignore any widgetset bindings residing as part of FPC?


cheers,
rob   :-)

Thaddy

  • Hero Member
  • *****
  • Posts: 19388
  • Glad to be alive.
Re: Gtk3 becomes default widgetset on Linux
« Reply #13 on: July 03, 2026, 04:56:17 pm »
This is an opinion, not fact:
Q1: yes, it already does. (this is a fact)
Q2: no. that requires a complete new architecture:
Although Lazarus goes a long way in making itself widget set agnostic, there are some problems to achieve that, because of the different signalling and messaging concepts between widget sets.
« Last Edit: July 03, 2026, 05:01:16 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Wirthian

  • Newbie
  • Posts: 1
Re: Gtk3 becomes default widgetset on Linux
« Reply #14 on: July 08, 2026, 06:06:52 pm »
I think Qt6 support being up to date and reliable is going to be very important for the foreseeable future. LGPL is alright for this.

Gtk3 on Wayland is not really stable beyond typical widgets. For applications using the canvas with deeper graphics APIs, Qt6 on Wayland is the headache free option if one wants to put it to serious use. I would expect LCL to be more modern and stable with Qt6 as the backend for Linux and FreeBSD.

 

TinyPortal © 2005-2018