phastmike / tags

A simple text tagger
Other
16 stars 0 forks source link

Gtk.ColorButton deprecated #36

Closed phastmike closed 1 year ago

phastmike commented 1 year ago

Gtk.ColorButton was deprecated in 4.10. Need to change to Gtk.ColorDialogButton:

phastmike commented 1 year ago

Documentation states that if a GtkColorDialogButton does not have a dialog associated with it, it will be rendered insensitive. That does happen but only after a button press. Before that it shows sensitive. Not necessarily a problem but is worth mentioning.

phastmike commented 1 year ago

Another problem, there are no signals on the new widgets, there's no way to trigger, programmatically, the color chooser dialog as an asynchronous method and then catch the new chosen color, as a consequence there's no way to update the example label. The ColorDialog is triggered automatically on a button click event and no way to run code during that event :/ ffs.

phastmike commented 1 year ago

One workaround is to use the GLib.object notify signal and catch changes on the rgba property ... really? ... <pause 5 seconds> ...

really !?