Recent

Author Topic: Current GTK2 and GTK3 Status for FPC / Lazarus  (Read 1141 times)

Schmitty2005

  • New Member
  • *
  • Posts: 12
Current GTK2 and GTK3 Status for FPC / Lazarus
« on: December 14, 2024, 04:04:00 pm »
With GTK2 being phased out, is GTK3 fully ready for use in Lazarus with Linux and Windows cross compile ?   I searched the forums and was unable to find updated information.  Other information on the website shows that GTK3 is still not ready for general use, and when I have tried it, there was too many issues to bother with. 

Some other open source software has simply used their own version of GTK2 and now ship that with the software.  GTK2 seems stable and totally usable. 

Is GTK2 going to be available in the future for Lazarus ?   Or is GTK3 going to be fully functional and implemented, phasing out GTK2 in Lazarus ?


AlexTP

  • Hero Member
  • *****
  • Posts: 2527
    • UVviewsoft
Re: Current GTK2 and GTK3 Status for FPC / Lazarus
« Reply #1 on: December 14, 2024, 04:04:50 pm »
GTK3 is not ready. CudaText project compiled for GTK3 shows totally broken toolbar/sidebar.

dsiders

  • Hero Member
  • *****
  • Posts: 1348
Re: Current GTK2 and GTK3 Status for FPC / Lazarus
« Reply #2 on: December 14, 2024, 10:34:47 pm »
With GTK2 being phased out, is GTK3 fully ready for use in Lazarus with Linux and Windows cross compile ?   I searched the forums and was unable to find updated information.  Other information on the website shows that GTK3 is still not ready for general use, and when I have tried it, there was too many issues to bother with. 

Some other open source software has simply used their own version of GTK2 and now ship that with the software.  GTK2 seems stable and totally usable. 

Is GTK2 going to be available in the future for Lazarus ?   Or is GTK3 going to be fully functional and implemented, phasing out GTK2 in Lazarus ?

I can't imagine that Lazarus will deprecate the GTK2 widget set (since that's the only GTK variant that actually works). GTK3 is still alpha IMHO. A GTK4 port does not even exist at this point.

The real question is how long will Linux distros continue to support GTK2. Not a Lazarus issue.

Given a choice, I would use one of the QT widget sets instead.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

AlexTP

  • Hero Member
  • *****
  • Posts: 2527
    • UVviewsoft
Re: Current GTK2 and GTK3 Status for FPC / Lazarus
« Reply #3 on: Today at 08:21:03 am »
GTK3 widgetset is improved in last weeks.
What is still bad for my CudaText in GTK3:

- horizontal splitter near 'Console' cannot be moved to the bottom, it is stuck at big delta
- caret cannot blink

zeljko

  • Hero Member
  • *****
  • Posts: 1697
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Current GTK2 and GTK3 Status for FPC / Lazarus
« Reply #4 on: Today at 08:45:45 am »
You can also write that your problem is on wayland, not x11.

dbannon

  • Hero Member
  • *****
  • Posts: 3219
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Current GTK2 and GTK3 Status for FPC / Lazarus
« Reply #5 on: Today at 09:17:26 am »
Schmitty, dsiders summed it up. FPC/Lazarus is not going to abandon GTK2.  But distros are increasingly not pre-installing it. But not as bad as that may seem. Note -

While it may not be pre-installed everywhere, every distro I have tested does have GTK2 available to install from their repos.

Qt5 and Qt6 are, really, really great alternatives. A new GTK2 install needs about 200Meg, Qt5 needs about 50Meg.

Finally, and most importantly, you do not have to choose one or the other. By using LCL, your app can easily switch between widgets. Its important you check, from time to time, if there is a difference and then you will add some {$ifdef XXX} things to manage those small differences.  I build GTK2, Qt5 and Qt6 (along with Windows and MacOS) binaries all from the same code. 

And, as Zeljko noted, Wayland is far more of a problem than choice of widget sets.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018