Issues with Gtk3 and wxpython 4

Is it just me that has serious issues with wxPython using Gtk3?

I am testing a working project using python3-wxgtk4.0 (4.0.1+dfsg-2)

and Python 3.6.5 direct from the Mint (tara) and Ubuntu (bionic) repositories

wx.Python reports its version as 4.0.1 gtk3 (phoenix)

I seriously believe that Gtk3’s authors have lost the plot.

Widgets appear to have grown in size.

Gtk3 spews errors onto the screen, many of which are deemed Critical,

which with Gtk2 behave perfectly.

GetPixelSize on a font reports an inaccurate width and they refuse to fix it

#https://bugzilla.gnome.org/show_bug.cgi?id=757142

#https://bugzilla.mozilla.org/show_bug.cgi?id=1269274

wx.ID_HELP is now wedded to F1, unless explicitly overridden.

Disabling a widget no longer seems to “Grey” it out.

SpinButton/SpinCtrl have been rewritten to be totally different.

The developers argue that the primary reason was to cater for those

whose motor skills aren’t good enough to cope with the small click arrows.

They chose to replace what was a small widget, with a monstrous one, rather

than writing a new option.

I’m sure that there must be hundreds of more issues large and small.

All this said, I am sure that at some point in the future, that I shall have

to make the jump from gtk2 to gtk3+.

My key issue with gtk3 is the complete rewrite of the SpinCtrl and SpinButton.

The smallest size that can be achieved without it displaying improperly

or spitting out a Gtk Warning, is at least twice the size of the gtk2 widget

and 3 times the size, if you only want a single digit spinner.

My ire is due to the fact that I have written a number of packages where

I place one or more SpinCtrl’s on the main screen, to allow instant access to

alter key options and yet still keep the footprint of the GUI as small as possible.

There appears to be no plan to restore the small gtk2 SpinCtrl or SpinButton,

so I have written my own MiniSpinCtrl. (Attached)

It may not be perfect and probably isn’t written to wxPython standards but for

anyone that is facing the same issue, feel free to use it.

Note: Only tested on Linux

Let me know if there are any bugs, criticisms or general feedback.

I have struggled with consistent sizing of the widget within sizers, without

having to use the wx.EXPAND option when adding it to a sizer, this may be the

fault of Gtk3 or it may be me not understanding something basic.

Any tips would be appreciated.

Regards

Rolf of Saxony

minispinctrl.py (21.5 KB)

Is it just me that has serious issues with wxPython using Gtk3?

I think most of the issues with GTK3 have been worked out over time, but yes, there are still a few, as you've noted.

I am testing a working project using python3-wxgtk4.0 (4.0.1+dfsg-2)
and Python 3.6.5 direct from the Mint (tara) and Ubuntu (bionic)
repositories

wx.Python reports its version as 4.0.1 gtk3 (phoenix)

I seriously believe that Gtk3's authors have lost the plot.

Widgets appear to have grown in size.

Yes, the biggest change, is as you've noted, the GtkSpinButton which now has the buttons positioned side by side horizontally, instead of stacked vertically. I believe this was done to make them usable on touchscreens. But yes, it results in the widget being much wider than before. Unfortunately, there's not a real great solution to dealing with the wider widget other than making sure your layouts are dynamic and have enough space for the wider version.

Gtk3 spews errors onto the screen, many of which are deemed **Critical**,
which with Gtk2 behave perfectly.

Yes, GTK3 is certainly a lot more chatty than GTK2. In a lot of cases, GTK3 is complaining that you haven't allocated enough space in your layout to fit the widgets. You will certainly see this when you try to use a SpinCtrl where you previously only had enough space for the GTK2 version. In other cases, the errors are not really critical and probably can be ignored if your application is working fine.

Scott

···

On Sun, 19 Aug 2018, rolfofsaxony wrote: