News for hackers. Stuff that matters.
Re:GTK has a new website by turbinerneiter on Sunday March 01, 2020 @04:47PM (#22459604)
I was playing with Glade the other day and it is quite a nice but also hard to get into. I wish there were more examples. I'm try trying to replicate some things I see in the GNOME settings app already, but I can't quite get it.

So - more Glade files as examples would be really helpful! Apperantly, most GNOME apps don't use it,not I just can't find the Glade source files for them.

But I guess the fact that the tutorial link brings you to a tutorial which doesn't work with the Glade version in the screenshot already gives away that glad might not be first priority.

It's still pretty good tough.

Re:GTK has a new website by cycloptic on Sunday March 01, 2020 @05:42PM (#22459908)
You can use the GTK Inspector to look through an open program to see what widgets it uses. It should be easy to understand if you're familiar with the Chrome/Firefox debuggers.

https://wiki.gnome.org/Projects/GTK/Inspector

What you'll find is that several GNOME apps use separate widget libraries like libdazzle and libhandy to get their look-and-feel. These aren't necessary, but they may save you some work to make your program feel a little bit more GNOME-like.

https://gitlab.gnome.org/GNOME/libdazzle

https://source.puri.sm/Librem5/libhandy

Re:GTK has a new website by turbinerneiter on Monday March 02, 2020 @04:36AM (#22462964)
Thanks, the Inspector is really cool!
Re:GTK has a new website by taf2 on Sunday March 01, 2020 @05:56PM (#22459992)
I used to work with Glade all day everyday for my day job in 2002-2004... I ended up doing a lot of the development in the xml files generated by the Glade UI.... Later as I was integrating Gecko into our desktop app to display help content I came to the realization that XUL and then HTML was equivalent just had more developers focused on it... So today I still view native app development from the sense that HTML is just a markup language for describing UI... and a lot of very talented engineers spend everyday from multiple organizations fixing bugs and improving the UX/UI performance and stability... making HTML the best (IMO) native app development environment... Of course, I still love exposing C++ components into my UI but the need is far less than in 2002-4...

I'll miss the old gtk.org... spent countless hours on that site... the gnome c interfaces will always be near to my heart... Love the new design though that looks great.

Re:GTK has a new website by graynk on Monday March 02, 2020 @01:04AM (#22462051)
> I'm try trying to replicate some things I see in the GNOME settings app already

It still baffles me that System Monitor uses real-time charting that is made entirely out of DrawingArea's and there aren't any good charting components in GTK period.

Re:GTK has a new website by pengaru on Sunday March 01, 2020 @05:33PM (#22459861)
> I'm try trying to replicate some things I see in the GNOME settings app already, but I can't quite get it.

Just grab the source for the settings app to see how it's done.

I don't think the core gnome/gtk folks have historically made use of glade, though maybe that's changing.

Re:GTK has a new website by zerr on Sunday March 01, 2020 @05:24PM (#22459800)
Also, Glade looks ugly with Windows theme.
Re:GTK has a new website by solarkraft on Sunday March 01, 2020 @06:14PM (#22460082)
Why would you use a Windows GTK theme?
Re:GTK has a new website by chrismorgan on Sunday March 01, 2020 @11:57PM (#22461782)
Perhaps because you're using Windows, to begin with.

GTK talks of native look-and-feel, but it's very poor at Windows look or feel. I have evaluated GTK for building apps that would be primarily used on Windows, and I gave up in short order after trying quite a few themes (ones trying to be like Windows 7, 10/Win32, 10/UWP, &c.). They were uniformly woefully bad for both look and feel, on my high-DPI environment. I got the impression some of them would have been better on a low-DPI device, but every last one of them would still have been bad in various serious ways. It always started with the title bar looking and behaving completely incorrectly, so GTK apps on Windows that want to look not awful start by telling GTK to let the OS draw the title bar. Then you get your file picker modals; and things like Inkscape drop GTK on the floor there, and call the Win32 API instead, on Windows.

And all this is fairly typical if you want it to feel native.

Re:GTK has a new website by solarkraft on Monday March 02, 2020 @03:04PM (#22468327)
I was considering doing the "why would you use Windows?", but okay, some just still do.

Do you really want your app to look Windows-native? I can't think of any large app doing it precisely because the standard widgets are ugly.

Meanwhile I've seen GTK apps on Windows just using Adwaita, which I think looks very refreshing on there. You could use any other GTK theme as well.

Re:GTK has a new website by chrismorgan on Tuesday March 03, 2020 @08:05AM (#22474094)
My biggest objection to Adwaita is that it’s awfully wasteful of space, especially on its buttons. As a particularly serious example, on my effectively-1500×1000 laptop, running the Inkscape 1.0 beta with its Win32 theme instead of Adwaita roughly doubles the canvas size available, assuming one sidebar open. (For more info about this, including also the woes of Inkscape’s Win32 look and feel—and Inkscape is honestly one of the very best GTK apps for nativeness on Windows, though this 1.0 beta has various regressions—skim through https://gitlab.com/inkscape/inbox/issues/879 .)

For starters, I think you’re underreckoning how many things look platform-native on Windows. To be sure, increasingly many things forsake it, primarily software using web tech to render, but there’s still a lot out there that’s fully native look-and-feel. And then there are degrees and degrees of native appearance—and what the definition of native is has shifted a couple of times over the course of the last two decades in Windows (the first form I have in mind will look different on XP, 7 and 10 from the same code, but I’m counting all those styles as one type of native). Anything that draws its own title bar is on thin ice, it’s probably doing the wrong thing, though it can be carried off well. (Office does it well, Chrome OK, GTK apps where they draw the title bar uniformly badly.) And then there are other widgets like dropdowns (<select> in HTML parlance) where GTK ones just behave in the wrong way, file pickers that are unfamiliar and don’t work right, &c.

Oh yeah, GTK apps seem to typically be pretty bad at high-DPI on Windows. The GIMP handles its canvas scaling (i.e. the definition of “100%”) incorrectly, but has no other major issues; Inkscape has major issues (see the earlier link); EasyTAG has major issues that can be mostly worked around by overriding Windows’ treatment of it (and 2.4.3 made its appearance even worse, but fortunately (?) I had to switch back to 2.4.2 because 2.4.3 is basically completely broken (https://gitlab.gnome.org/GNOME/easytag/issues/5), and no one seems to care); those are the only three GTK apps I have at present.

Re:GTK has a new website by solarkraft on Tuesday March 03, 2020 @04:45PM (#22479016)
I only use Windows at work, so I don't know that many apps. Today I tried out gitg, a GTK git client that has a Windows build. Damn, it feels great.It ues the Adwaita theme with a client side header bar, which looks great, saves space over all and is only marginally thicker than any other Windows title bar (it even shows the dragging cursor when dragging, why the absolute does Windows not do this).

Touchpad scrolling isn't smooth, which is a little bit sad, but generally I'm surprised by how well it works. From what I can tell scaling works perfectly and the file picker, which is not the native one, which is great, because it's less awful, seems to work well with the file system.

Over all it's one of the Windows apps I hate the least - by staying as far from the platform as possible, UI wise.

It feels a bit weird that this is coming from someone who likes to complain about GNOME.

Re:GTK has a new website by Fnoord on Sunday March 01, 2020 @07:22PM (#22460433)