TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GTK4 for Graphical User Interfaces

160 pointsby chauhankiranover 4 years ago

14 comments

hmryover 4 years ago
The full title appears to be "GTK4 for Graphical User Interfaces with the Nim Programming Language", so putting in a reference to Nim in the HN title might be a good idea.
评论 #25622334 未加载
评论 #25622478 未加载
评论 #25624395 未加载
pierrebaiover 4 years ago
As a supposedly guide to writing app, the introduction reads more like an opinion piece.<p>The author has a very anti-C stance to say the least. For an article about writing UI, it spends a lot of time laying out all the short-coming of using C to build a UI toolkit.<p>Amusingly, Qt is mentioned as initially not having a FOSS license but &quot;now available in version 6 with much less restricted licenses&quot;... that&#x27;s quite a weak praise given that it is available as LGPL, GPL or commercial non FOSS licensing. He then goes on criticizing Qt for being bloated. Most people would rather say that is very feature-rich. Qt is also modular. You don&#x27;t need to include libraries you don&#x27;t use.<p>English does not seems to be the author native language; there are many bad choices of word, like saying that C in &quot;restricted&quot;; I think he meant it is &quot;limited&quot;.
评论 #25622342 未加载
评论 #25622422 未加载
评论 #25622347 未加载
评论 #25623781 未加载
bastawhizover 4 years ago
I realize this is an article about GTK, but the author is really not selling it. It opens with an explanation that GTK is pretty much not maintained. Later, it&#x27;s compared to Qt:<p>&gt; The advantage of Qt is that it is active developed and supports all important operating systems including the mobile Android and iOS systems with a native look and feel.<p>These feel...like important things for your application framework to support. Qt&#x27;s &quot;bloat&quot; is listed as the only major disadvantage, but only after lamenting GTK&#x27;s own bloat.<p>&gt; For many Windows or macOS users GTK has the disadvantage that GTK draws all it widgets itself, it does not use the native graphical elements of the proprietary systems. GTK allows theming by use of cascading style sheets (CSS) so it can be tuned to look not too strange on Windows and macOS, but look and feel generally does not really map to native apps.<p>Personally, this is one of the worst disadvantages of GTK for me, and makes me cringe when I see an app using GTK&#x27;s default styling. Even Electron (also lamented for its bloat) does &quot;native&quot; controls by default.<p>There&#x27;s really got to be a better argument for using GTK than &quot;it&#x27;s less bloated and is written in C&quot;
评论 #25627983 未加载
longstationover 4 years ago
It&#x27;s great that the author promotes both Nim and GTK4, which, in my opinion, are both great opensource projects. But I think the author should make it clear that he disabled text anti-aliasing for some reason. A lot of people in this thread are complaining how bad the text rendering is. As someone who uses GNOME (build with GTK) for years, I want to make it clear: GTK supports both anti-aliasing and hinting. The text rendering looks great! It&#x27;s really just one web search away to check the effects.
overgardover 4 years ago
&gt; Unfortunately GTK is currently not in a very active state. There seems to be one or two paid full-time developers which try to finish official release 4.0 and a few volunteers which support the development.<p>Really selling it there. If I&#x27;m going to learn a thing the last thing I want to hear is &quot;dead project&quot;
评论 #25628040 未加载
评论 #25629700 未加载
dekhnover 4 years ago
After working with a wide range of windowing libraries (from raw win32 and x11 to Tkinter, Wx and Qt), I&#x27;ve finally landed on and am staying with qt. It does pretty much everything better than all the other windowing libraries.
_ph_over 4 years ago
I had not looked at Nim before, but certainly will do. If anything, GTK is lacking a bit HOWTOs, which give the beginner a guide, which APIs to use for a certain task. So I will give this a good look. Personally, I have used GTK from Go, which also is a nice match for the API.
评论 #25622203 未加载
macmacover 4 years ago
The text rendering seems very poor. Is that an artefact of the font used, the platform or something else?
评论 #25622028 未加载
评论 #25622962 未加载
评论 #25621998 未加载
unwindover 4 years ago
Oh, did they drop the &quot;+&quot;? The name used to be &quot;GTK+&quot; but that seems to have changed. Does anyone know when?
评论 #25621925 未加载
benbristowover 4 years ago
Can&#x27;t help but think a lot of code is needed here just to render some controls on a window.<p>Something like XAML for GTK would be nice.
评论 #25622211 未加载
评论 #25622229 未加载
评论 #25622282 未加载
评论 #25628087 未加载
评论 #25622855 未加载
评论 #25622275 未加载
mseidlover 4 years ago
#qt4ever<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gGZyVSOnqm0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gGZyVSOnqm0</a><p>The tl;dw: Kernel guys made a scuba diving app, using C + GTK. They switched to C++ and QT, due to issues&#x2F;poor quality of GTK, bad attitude by GTK. QT also fixed a lot of complaints they had about C++. Also QT looks like native application on other platforms.
评论 #25625105 未加载
wcchandlerover 4 years ago
The author talks about how android doesn’t use GTK. What does Android use? Some kind of Java thing?
评论 #25623085 未加载
chrisseatonover 4 years ago
Wow the text rendering is <i>atrocious</i>. Is this still the state of GTK and desktop Linux today?
评论 #25622978 未加载
评论 #25623086 未加载
评论 #25625023 未加载
评论 #25625238 未加载
ku-manover 4 years ago
Title should be: GTK4 for Graphical User Interfaces with Nim