GTK GUI with PyGObject (10)

Date: 2021/07/23 (initial publish), 2021/07/29 (last update)

Previous Post Top Next Post


Note on recent change of environment for GUI design

Since the computer monitor screen has changed fro VGA (4:3) to HDTV (16:9), screen got wider. In other word, we have relatively less vertical space for the computer monitor screen.

Now cellphones and tablets are powerful enough to use previously Desktop only general purpose programs. Go the GUI need to handle touch events.

Lastly, X11 is not the only GUI target. Wayland and browser needs to be addressed.

These things are driving changes in design of the low level GUI support tools such as GTK.

Recent GTK changes

Quite frankly, it was very confusing for me since GTK was a moving target. We are moving even to GTK4 now after August/2021 for Debian. (I mean post-Bulleseye release.) Here is my memo.

Here are list of information I gathered to solve “Titlebar” and “Primary menu” questions. I also posted comments based on my understanding.

It looks to me there have been an effort to save vertical space. I can summarize the originally intended design practice of each platform as:

As usual of these platform transition, the last release of each generation of platform supports platform of the next generation while deprecating the practice it used to support. Debian Bullseye as of 2021 is based on the last release of GNOME3/GTK3 in late 2020 and its design principle has moved almost to GNOME4/GTK4 ones. Namely, it recommend to use primary menu started from the titlebar created with Client-side decoration (CSD).

Topics related to “Client-side decoration” and menu of GNOME/Gtk in historical context. (events and some blogs from older ones to newer ones in the order):

GTK3 to GTK4 migration.

Before going any further, let’s look at the GTK3 to GTK4 migration.

GTK4 has matured now (2021-07). So when writing any more code for GTK3, we should avoid deprecated features and widgets to minimize future efforts.

(My stable Desktop system environment is Debian/Bullseye which is still GTK3.)

API reference of GTK4 is at now(2021-07).

I found the followings to be good references to understand differences between GTK3 and GTK4, and where GTK4 is heading to.

Also, since Nim is similar to Python, GTK4 for Graphical User Interfaces with the Nim Programming Language was interesting to read.

GtkMenuButton and GtkPopover and GAction …

The following may be partially wrong. Just my learning note.

Too much info and confusing for me.

Previous Post Top Next Post