GTK3 regressions from a GTK2 perspective

So far the PR has gotten mixed responses. Some of us here really disliked the "spreading" of the dialog buttons; turns out @raveit65 likes the spreading and says no to the lack of spreading I (unintentionally) whipped up. I wrote back a response which details the advantages and disadvantages of both methods, and strongly urged @raveit65 to not include the expanding buttons.

We'll have to see what happens. Personally I don't care about the buttons, but enabling the expanded buttons also means using a deprecated function in GTK+ 3. As far as I can tell, there's no way around the use of the deprecated feature -- @raveit65 claims applying a style class would do the trick, but the result still doesn't look right.

I defended our position by showing that in MATE, the old-style button layout is more common than the new-style layout. I hope we can come to an agreement on this issue.

Spread buttons require a deprecated function!? I thought this was a new GTK misfeature. How is it deprecated?

Good question, but it requires a little background.

When a feature is "deprecated" in GTK, that only means that the feature is deprecated for use by applications; the feature may be used within the GTK library itself for as long as the feature exists. Heck, the use of the feature in the GTK does not even throw up a warning under most circumstances.

The old style of logout dialog used a GtkMessageDialog, which is derived from a more generic GtkDialog. Since GtkMessageDialog is implemented inside of GTK, the usage of the deprecated function in question does not throw up a warning; if there even was a warning, it was when GTK was compiled. GtkDialog actually has more conservative button layouts than GtkMessageDialog, apparently. (An oversight on the part of the GTK team, perhaps?) My proposed logout dialog uses the generic GtkDialog instead of GtkMessageDialog so that I can insert an image on the left and stuff. In other words, I did it for extra flexibility -- not really for the buttons, but that was a side benefit.

Honestly, I don't see what anyone's complaining about. The majority of dialogs in MATE use the old style, and the GTK+ 2 version of MATE had a log out dialog which looked practically identical to this one. But it looks like I'm going to have to partly concede here if I want to push this patch through. Oh well.

I've been spectating the pull request from afar - thank you for working on improving this! :+1:

I think there's two visual concepts being mixing up in those reviews - I know the combine/linked style button look can certainly be influenced by the theme. Ambiant-MATE (our default) doesn't make them "stick" together anywhere:

Screenshot at 2020-11-07 11-38-01
Screenshot at 2020-11-07 11-38-18
Screenshot at 2020-11-07 11-38-12

Presumably, the first two screenshots are using GtkMessageBox, causing buttons to stretch and space out to the full width of the window, as well as the center text alignment (yuck...). Definitely can see how GTK3 is influenced by GNOME 3's design guidelines there.

Whereas the third screenshot is closer to GTK2's traditional placement by placing buttons on the far right, similar to how Qt/KDE (and Windows/macOS) continues today and GTK2 did back then:

Screenshot at 2020-11-07 12-39-54

Please stop posting FAKE-NEWS under my name!
I never told you to add a deprecated function.
Only Mr. Trump is allowed to post fake news :stuck_out_tongue:
Again,
Adding the .linked style class to GtkButtonBox , which is the parent of the buttons, with gtk_style_context_add_class isn't deprecated.
That means themes like MATE default Menta or gtk default Adwaita use the .linked button style.
Other gtk themes like Mate-Ubuntu themes doesn't use that settings in their gtk-widget.css.

It looks like that most people of the MATE team, apart from me, doesn't like the change, because you add accessibility problems with readability of the progress text.
And there are other problems, see last post https://github.com/mate-desktop/mate-session-manager/pull/261#issuecomment-723419348

Personally i like to add the icons to the dialog, but that's all and i am sure this can be done with actual gtk3 dialog of this application.

PS:
I am i doubt that the few users here of ubuntu-mate channel are the majority of MATE users all over other distros.

1 Like

Sorry everyone -- I had to close that pull request. I never was super gung-ho about the addition, and if @raveit65 doesn't really want it, then frankly I think it's not worth pushing forward on this. I'm also already adding more gray hair to my (already slightly graying) head. :face_with_hand_over_mouth:

So sorry but I hope everyone can live without this change a little longer.

Are there plans to tackle GTK4 or let MATE ride into the sunset on the GTK3 horse?
It seems GTK devs broke the future for traditional GTK desktops.
MATE will be appreciated as long as it is around. Thanks for the work you do.

2 Likes

I guess I've regained some of my colored hair, so I'll return to the "good fight" (TM) and resume (trying to) figure out what @56tievar is talking about.

BTW, what "fake news"? I don't get it.

@lah7:

By the way, how did you get the icon next to the first dialog in your post there? It seems to be GTK+ 3, and that dialog is indeed powered by GtkMessageDialog, and GtkMessageDialog actually lacks any code to display icons (I'm pretty sure). I was unable to replicate that dialog appearance using my stock MATE and GTK:

caja

Are you using gtk-mushrooms or something? Just curious.

Nothing special, it's the default in Ubuntu MATE. I genuinely don't know if it's a setting or something patched at distro level. A quick look in dconf/gconf editor didn't reveal anything. Doesn't seem to be an icon/theme thing either. :confused:

Which distro and version are you using?

I no longer use MATE myself, but I do have gtk-mushrooms (AUR) installed which did restored the dialogs for those few GTK applications.

I wish I could use Ubuntu MATE, but I only rarely can use it, as most of my machines are 32-bit capable only. As such I use (hopefully) Ubuntu MATE's closest relative, Debian, most of the time, and Debian is the system I was using when I took that screenshot. For whatever it's worth, I use Debian 10.6 (Buster) because Bullseye isn't stable yet, and also because of some LibreOffice GTK+ 2 foibles. Thus the MATE version I have is 1.20.4 and the GTK version is 3.24.5.

Weird. I guess the Debian version of GTK or Caja is not the same as the Ubuntu / Ubuntu MATE version -- most likely Caja was patched, because no icon appears next to the Log Out dialog anymore no matter what, and the Log Out dialog always uses GtkMessageDialog too.

OK. I guess it goes without saying that Ubuntu MATE is not based on Debian 10 -- if anything it's probably closer to Debian 11, at least in terms of package versions. But Gentoo, which ships with the newer MATE 1.24 and GTK 3.24.22, also displays the Caja prompt without an icon. Odd.

Well, it's not too interesting after all.

1 Like

Hey Gordon how come no one got an idea to place the pause button on that shutdown dialog? :smiley:


Text inside the progress bar is less readable.

What kind of elaborate joke is that?!? I really don't get it. What's with the STLWRT donkey on the progress bar? What pause button?

Oh wait. You mean you want something which pauses the shutdown delay?

Still, I don't get the joke program.

(BTW, care to share that code for making the donkey move over when pushed by the progress indicator? :slight_smile: )

Also, why are you covering up errors produced by your program using 2>/dev/null? :confused:

(Furthermore, that's the funniest demo I've seen all week!)

The progress is similar to Nyan Cat.
I did not put the rainbow in the progress bar, although it's doable with CSS.

It looks better when switched to dark theme because of your profile picture.
Gtk spills some warnings over the dark theme used, so 2>/dev/null.

Here's the app


There are two threads one to set the progress bar and one to animate gif.
The one that sets the progress also sets the left margin of the image:
  gtk_widget_set_margin_start(widgets->progress_image,
                              alloc->width);

But first gets the progress bar's allocation->width. :slight_smile:

I don't know how to make animations from images, (probably can but looks like too much work) so I uploaded gordon.png to one website that creates animated gif from static image. https://www.kapwing.com/studio/editor

It's been nearly 2 years since this topic was created, and now I maintain a series of patches called gtk3-classic ... previously known as gtk3-mushrooms.

Even though my C isn't great, I have managed a couple of fixes - including the ability to scroll over tabs like we could do in GTK2.

It is packaged for Arch (which is pretty straight forward, actually), but I haven't forgot about Ubuntu MATE! At some point I will have another go at creating a PPA / Debian package so you can enjoy classic features of GTK2 in GTK3. I just need to figure out how to "turn off" tests for the Ubuntu gtk+3.0 package.

I think patching GTK3's quirks is a good workaround until STLWRT enters the scene as a possible GTK "slot in" replacement. :slightly_smiling_face:

6 Likes

In other news: most GNOME apps and any app that uses the new libadwaita library will force the Adwaita theme. I hope people are getting ready to fork every GNOME app that wasn't already forked.

1 Like

For anyone still following, gtk3-classic is packaged up for Ubuntu 20.04 LTS, 21.10 and 22.04!

Special thanks to @Norbert_X for helping with this, and @gordon for recently patching the alternate row colours (requires an additional step).

Looking at the first post, looks like the visual "regressions" from GTK2 have something to supplement them. :trophy:

8 Likes

I've installed this and I like what there is of it that I've seen a difference to.

My question though is this just reverting back to earlier versions of GTK3 or does this show a way forward for the distro to be able to keep its distinctiveness while still being up to date on the latest GTK?

1 Like

Technically, it's a collection of patches on top of the same GTK3 package made for that Ubuntu release. Those patches add or change bits of code to provide what we liked from earlier versions.

21.10 & 22.04 use GTK 3.24.30 whereas 20.04 LTS provides GTK 3.24.20. Due to differences in GTK3's code, a couple of patches can't apply correctly so there hasn't been officially any build for 20.04 yet.

I'm not sure if Ubuntu MATE could be officially allowed to promote this patched classic idea of GTK+3, being an official flavour; PPA implications and such. At best, I suppose there could be a button in the Welcome application, like there is for ubuntu-mate-colours.

There's also the fact this is entirely unsupported. If something breaks, you keep the broken pieces. Upstream projects everywhere shouldn't care about a modified build of GTK+3, so users should not pester issue trackers over bugs caused by one of these patches.

7 Likes

I've enabled the Discussions tab for gtk3-classic -- sort of like a subcommunity on GitHub for those who cherish the classic / traditional desktop:

There's probably more of us out there outside of this topic who ain't users of Ubuntu or MATE. Pretty sure a guy using FreeBSD makes use of these patches too!

4 Likes