Recent

Author Topic: How long gtk+2.0 will last?  (Read 14616 times)

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #15 on: December 31, 2018, 03:53:27 am »
Man, as a programmer you should be more accurate. If you refer to the title, there is exactly about gtk2. But the main "target" of my post is about the look of the application developed in Lazarus (if you analyze the text). More and more gtk2 based applications are migrating to gtk3 and there is no warranty that the gtk2 theme engine and the associated themes will continue to be distributed so, the future of the look of a gtk2 based application is uncertain.

There is no fight against gtk but the support for gtk3 is still alpha and only qt comes with a guarantied modern look (regarding seriousness, I referred to the scandal generated by the gtk developers resistance to "theming" and the breaking of any custom theme with every new gtk release - well, I agree with them that there should be a consistent look as long as there is also a dark theme variation, but making them "embedable" should be preferable).

If you want to plead for gtk, do it without attacking my post.
And yes, I am still in doubt as compiling for gtk2 I have the certain advantage of static linking and I don't force the users to install additional shared libraries. Even more, is not easy (for the same users that maybe don't know Lazarus and Pascal in general - my project is open source) to compile for qt5 when Lazarus defaults to gtk2.

P.S.
Embedded Fusion style in Qt5, consistency across all operating systems: http://blog.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/
Modern and pretty enough for me. If Gtk3 can embed a default theme, I am sold.
« Last Edit: December 31, 2018, 05:13:31 am by funlw65 »
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How long gtk+2.0 will last?
« Reply #16 on: December 31, 2018, 06:39:50 am »
Yes funlw65, you do have some good points.

QT might be a viable alternative but why do we want/need an alternative ?   For me, the thing that makes FPC/Lazarus really great is that it produces a (usually) dependency free install.

Right now, on Linux we are all using GTK2 and, honestly, mostly happy about that but we are ignoring the future. Same as we did on the Mac, we wrote for Carbon right up until Apple started waving a big stick. Cocoa is now pretty good but no where near as stable as Carbon.

On Linux, we use GTK2, smug in the knowledge that Gnome will 'always' support it.  Well, anyone tried to use the Lazarus SystemTrayIcon on (eg) a recent Fedora ?  The Gnome developers decided that aspect of GTK2 was ugly (or something) and it no longer works in 'pure' gnome 3.28 or later.

Ubuntu had a similar AppIndicator for Unity (remember Unity ?) and still, at present, ship it. Last time I checked, Debian was not yet up to Gnome 3.28, been awhile....

My point is "we'll always support" is up to the supporter to define. And we may not like their definition !

My research prior to this post ?  QT5 is not hard to get going using Ubuntu Repos but a form with one button idles at 100% cpu. The wki page on QT5 refers you to the readme.txt file that refers you to the wiki. GTK3 does not link, I guess there is binding library missing. The GTK3 wiki page is about 50 words long.

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

dubst3pp4

  • Jr. Member
  • **
  • Posts: 86
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: How long gtk+2.0 will last?
« Reply #17 on: January 01, 2019, 03:47:27 pm »
If you want to plead for gtk, do it without attacking my post.
Sorry funlw65, it was not my intention to attack your post! I'm just wondering that everytime in this forum when someone ask about GTK, the standard response is, that qt is the "better" and "more serious" toolkit and that the "new" GTK3 api is just "crap" and "unstable". GTK3 is now exactly 8 years old and unfortunately no-one seems to be interested in creating GTK3-LCL-bindings - which makes me really sad. I would like to see the same support as many many other languages have. And I'm also willing to improve the situation - but unfortunately I don't have the time to do this alone.

Maybe dbannon got it better to the point which I'm afraid of: That the GTK2 support ends like the Carbon bindings: Carbon was officially deprecated in 2012 - and now, 7 years later the Cocoa support of LCL is still not mature. This is of course no problem for the majority of Windows users, but for the macOS users of Lazarus this really hurts. And the same it hurts me as a long-time GNOME user that GTK3 support is still uncomplete.

That said I don't want to get on your nerves or to disrupt your post ;-)

I wish all Lazarus and Free Pascal users a happy New Year!
Marc
Jabber: xmpp:marc.hanisch@member.fsf.org -- Support the Free Software Foundation: https://my.fsf.org/donate

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How long gtk+2.0 will last?
« Reply #18 on: January 01, 2019, 10:27:00 pm »

.....the standard response is, that qt is the "better" and "more serious" toolkit and that the "new" GTK3 api is just "crap" and "unstable". GTK3 is now exactly 8 years old and unfortunately no-one seems to be interested in creating GTK3-LCL-bindings - which makes me really sad. I would like to see the same support as many many other languages have. And I'm also willing to improve the situation - but unfortunately I don't have the time to do this alone.
....
I think you have summed it up well Marc. QT is apparently pretty good, However, its use is an arcane and well kept secret.  And it introduces dependencies. If we believe the wiki, GTK3 is a long way off. People like you and me would like to help but as someone who's been poking around in the lower levels from time to time, I believe the learning curve is too steep. 

There are some very hard pressed "top guns" out there, they cannot afford the time stop and write some docs or assign some apprenticeship tasks to the less skilled. Short term, its not efficient to do so. But long term ....

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

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: How long gtk+2.0 will last?
« Reply #19 on: January 02, 2019, 08:25:49 am »
I won't take sides, but just some observations:
1. GTK was once considered as code bloat on top of X.
2. GTK2 is considered "lightweight" nowadays....
3. GTK3 isn't.
4: Qt - any version - never was.

Both GTK3+ and Qt( any version and by design)  suffer not from code rot, but resource rot.
Any rot slows down your application...
Both the  Qt and GTK projects have the gift of humongous breaking API changes.

And Qt runs much slower than GTK2 because it is so resource intensive. As does GTK3.
That limits in both cases the amount of platforms you can actually use it in any meaningful way.....

The above will also mean GTK2 will be around for quite some time.
It finally deserved the status of "lightweight"..... :D
« Last Edit: January 02, 2019, 08:54:02 am by Thaddy »
Specialize a type, not a var.

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #20 on: January 02, 2019, 11:12:10 pm »
...
The above will also mean GTK2 will be around for quite some time.
It finally deserved the status of "lightweight"..... :D

Yeah, I can see the advantage of that, but then we have to solve the problem of theming. A way to embed two themes (light and dark) in the gtk2 and that will solve the eye candy for years to come. For both Lazarus and applications look.
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #21 on: January 03, 2021, 07:27:13 am »
The only definitive solution is to rewrite the C part of gtk2 directly in freepascal. A monumental work, but having visual components is vital for Lazarus. 
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: How long gtk+2.0 will last?
« Reply #22 on: January 03, 2021, 01:01:17 pm »
The right answer to that is that instead the CustomDrawn interface needs to be improved/completed. It works directly atop of X11 (and in the future should also support Wayland) and has no external dependencies. Currently it's only suitable for simple windows however as not even menus are implemented...

Also there is quite some work going on in the GTK3 backend so maybe you can help out to improve that?

ferdnyc

  • Newbie
  • Posts: 1
Re: How long gtk+2.0 will last?
« Reply #23 on: January 03, 2021, 03:28:09 pm »
Also there is quite some work going on in the GTK3 backend so maybe you can help out to improve that?

At this point, if they aren't targeting Gtk4 (as of 2020-12-16, officially released), then they're really just setting themselves (and everyone else) for a rerun of the current situation with GTK2. I mean, at this point working on GTK3 is fairly close to targeting an already-dead platform. Not quite necrophilia, but a bit morbid.

By the same token, any further development involving Qt should really be focused primarily on Qt6. (Released as of 2020-12-08, though with some compatibility deficits relative to Qt5 that they're promising to shore up come 6.1 or 6.2.)

P.S.
Embedded Fusion style in Qt5, consistency across all operating systems: http://blog.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/
Modern and pretty enough for me. If Gtk3 can embed a default theme, I am sold.

In fairness, none of the Qt5 platform themes are "embedded". On all systems (except maybe when literally-embedded in the form of Qt for Embedded Linux, a lightweight hardware-device platform), the theming relies on Qt's plugins system, and is dynamically loaded on application launch. All theming is done using plugins, and at least one platform plugin is required to even initialize a QGuiApplication.

The Qt installers have a set of default themes that they ship with, and the fusion theme (at a minimum) is bundled into Qt5 on every platform which provides some nice standardization, but it is in no way, shape, or form "embedded".

Soner

  • Sr. Member
  • ****
  • Posts: 305
Re: How long gtk+2.0 will last?
« Reply #24 on: January 03, 2021, 03:45:54 pm »
Forget Gtk3 lets make Gtk4 bindings.
Final release of Gtk4 is out and they dropped support for gtk2.
https://blog.gtk.org/2020/12/16/gtk-4-0/

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #25 on: January 03, 2021, 04:30:00 pm »
The right answer to that is that instead the CustomDrawn interface needs to be improved/completed. It works directly atop of X11 (and in the future should also support Wayland) and has no external dependencies. Currently it's only suitable for simple windows however as not even menus are implemented...

Also there is quite some work going on in the GTK3 backend so maybe you can help out to improve that?

Prior to posting this reply, I was reading a certain Wiki page and I completely agree with the author.  And with you. Recreating the LCL on top of an existing GUI toolkit is a huge task that never ends. So I think that indeed, the CustomDrawn interface is the only way to go. If it will come with both a light and a dark standard style. Quoting from the Wiki:

Quote
The native look is very important for many developers, but combined with the VCL compatibility necessitates many complex interfaces to the different native widget sets (Gtk,Win32,Carbon,Qt). The continuous evolution of these native widget sets (gtk1->gtk2, win32->?, qt) provokes endless catching up.

I won't give a link to that Wiki, I'm not here to drive people to other tools.
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How long gtk+2.0 will last?
« Reply #26 on: January 03, 2021, 04:49:28 pm »
Customdrawn will face constant challenges of being non native, and as soon as development slows down will look outdated too. It is as thankless a job as adapting a new GTK.

There is simply no longterm stability in the *nix GUI world.

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #27 on: January 03, 2021, 05:10:05 pm »
Customdrawn will face constant challenges of being non native, and as soon as development slows down will look outdated too. It is as thankless a job as adapting a new GTK.

There is simply no longterm stability in the *nix GUI world.

If it looks like Fusion Qt style and has light and dark themes it works for me, no matter the OS and the current theme of that OS;

No need to "update" it as it looks the same on all OSes (Fusion is pretty enough), just HiDPI compatible.  But if is equipped with a style engine, it can look like the whatever theme the OS has. You don't need to play "catch up".
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: How long gtk+2.0 will last?
« Reply #28 on: January 03, 2021, 05:15:13 pm »
I think the web interfaces are good to try, now for example chrome embedded framework for linux. Or just use the OS default browser, making the application just a local server. I did that in a commercial application and works fine. No more LCL issues.

funlw65

  • Full Member
  • ***
  • Posts: 148
    • Visual Pin Configurator for Nucleo 64pin boards
Re: How long gtk+2.0 will last?
« Reply #29 on: January 03, 2021, 05:16:50 pm »
It is why I said that we need to make the gtk2 our own by rewriting it in pascal (it is how you become a real Qt rival regarding GUI solutions - in that moment, Qt loses its relevance). The major problem of gtk2 sources is the C compiler that changes constantly and the sources must be  maintained for that matter. Once gtk2 is rewritten in pascal, the "catch up" play ends. It will be part of the Lazarus distro and sources.

But I understand that there is CustomDrawn...
« Last Edit: January 03, 2021, 05:30:03 pm by funlw65 »
FreePascal 3.2.2, C 10.2.1, D 1.24 under Linux(init,musl,glibc), DragonflyBSD, NetBSD
gui: gtk2, qt5, raylib4.x+raygui3.x, nanovg 
tui: freevision, tvision2, termbox2+widgets, finalcut
db: typhoon-1.11...

 

TinyPortal © 2005-2018