Recent

Author Topic: Lazarus IDE built for LCL-GTK3 is usable  (Read 3001 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4695
  • I like bugs.
Lazarus IDE built for LCL-GTK3 is usable
« on: March 02, 2026, 09:17:29 pm »
As some people noticed, GTK3 widgetset has advanced so that you can build the IDE with it and use it for real work.
Zeljko has made the docked IDE usable. The default non-docked IDE had one show-stopper, the MainBar height calculation went wrong and the component palette didn't show.
I added a temporary fix there and made a bug report.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/42083
Now it works at least on my X11 Linux system, I haven't tested with Wayland.

Please test. There are still plenty of bugs. If you report a bug, please make it specific and with example code.
Anyway thanks to Zeljko and some other contributors the recent improvements are huge. A functional IDE is a big milestone.
LCL-GTK3 will be the default in Lazarus 5.0 (whenever that happens).
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

bobihot

  • New Member
  • *
  • Posts: 47
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #1 on: March 03, 2026, 12:19:04 am »
Wayland is QT6 based. Maybe Lazarus must be set for this?

dsiders

  • Hero Member
  • *****
  • Posts: 1556
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #2 on: March 03, 2026, 12:26:39 am »

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #3 on: March 03, 2026, 11:23:00 am »
Wayland is QT6 based. Maybe Lazarus must be set for this?

OMG. Can you read a bit docs about wayland, qt5/6, x11 etc and then tell something about it ?

wp

  • Hero Member
  • *****
  • Posts: 13427
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #4 on: March 03, 2026, 01:01:48 pm »
Built myself a Laz/main based upon gtk3 in a Mint-VM (XFCE Wayland). Looking fine, no crash that I saw before. Compiled and ran some projects - no issue.

One issue: Open the IDE, add a button or something else to the default form, do NOT SAVE, exit the IDE --> you are asked to "save changes to project". Respond "No" -- I'd expect that the IDE does not save and closes. But here this prompt returns again and again. The only way to exit the IDE now is to click "Yes" and to cancel the file dialog, then "Discard changes and quit".

Another annoyance: the super-large +/- spin buttons of TSpinEdit and related controls. They are a cross-platform killer because they cover most of the control width and make the real input part unreadable if the project had been designed in another widgetset. Doesn't gtk3 have the up/down arrows used by the other widgetsets?

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #5 on: March 03, 2026, 02:13:09 pm »
Dialogs will be fixed, they're on my TODO list, same for TSpinEdit's, but in case of spins that depends on theme. Adwaita have +- buttons, so spins need more space. I'll check what to do in that case when someone wants override default behaviour of gtk3. Besides that, it is alyways better to open issue about problem and attach example project than write problems on forum. Opened issue won't be forgotten.

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #6 on: March 03, 2026, 11:13:05 pm »
I've commited gtk3themes, also fixed few issues, you can test.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1869
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #7 on: March 04, 2026, 08:41:49 am »
Good ! Thanks !!
Tested a it. Looks good. Page-tabs still need some work: see included screenshot Ubuntu 20.04 AMD64.

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #8 on: March 04, 2026, 09:00:56 am »
That's wayland screenshoot ?

Thaddy

  • Hero Member
  • *****
  • Posts: 18792
  • Glad to be alive.
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #9 on: March 04, 2026, 09:06:07 am »
Wayland is QT6 based.

Nonsense.

Yes, that is nonsense.
What is true is that Qt6 works better on Wayland than Qt5 or GTK3.
I think you misunderstood the relationship.
Recovered from removal of tumor in tongue following tongue reconstruction with a part from my leg.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1869
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #10 on: March 04, 2026, 09:44:25 am »
@zeljko
No, its the vanilla Ubuntu 20.04 install with x11.
However, are you more interested in Wayland than x11 ?
If so, I will start testing under Wayland.

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #11 on: March 04, 2026, 11:08:45 am »
No, I'm testing, there's still a lot of TODO's for designer in gtk3, will be fixed at some point in time.

dbannon

  • Hero Member
  • *****
  • Posts: 3742
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #12 on: March 04, 2026, 12:31:46 pm »
Don's question is a good one. I just posted a couple of bug reports but did not mention the Desktop or X11/Wayland (which is generally determined by Desktop). In my case, Mate DE, no Wayland anywhere.

But I reckon we should all mention that in bug reports, ie -

OS - Linux, Mate, X11

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

zeljko

  • Hero Member
  • *****
  • Posts: 1884
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #13 on: March 05, 2026, 10:40:20 am »
I need more info about your distro and exact x11 version.
EDIT: also pls gtk3 version. I'm interested if it's < 3.24

Seenkao

  • Hero Member
  • *****
  • Posts: 744
    • New ZenGL.
Re: Lazarus IDE built for LCL-GTK3 is usable
« Reply #14 on: March 05, 2026, 10:48:46 am »
Когда я в последний раз пробовал GTK3 в своём проекте.
Используя CheckBox, установив ему визуальное свойство Checked и активируем OnChange.
Если происходит FormActivate.
То, при такой раскладке, происходит вызов OnChange (CheckBoxChange) раньше, чем форма активируется (раньше FormActivate).

Googla translate:
The last time I tried GTK3 in my project.
Using CheckBox, setting its visual property to Checked and activating OnChange.
If FormActivate occurs.
Then, with this setup, OnChange (CheckBoxChange) is called before the form is activated (before FormActivate).

Debian + Cinnamon + X11/xLibre
Free Pascal Compiler version 3.2.2-r0d122c49 [2026/02/23] for x86_64
Lazarus 4.99
« Last Edit: March 05, 2026, 10:51:10 am by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

 

TinyPortal © 2005-2018