mirror of
https://github.com/lutris/lutris.git
synced 2026-06-17 10:19:58 -04:00
Migrate the entire GUI layer to GTK 4.10+. The app launches and displays the game library (grid/list views with covers) without errors. Key changes: - gi.require_version: Gtk 3.0→4.0, Gdk 3.0→4.0, WebKit2→WebKit 6.0 - Container packing: pack_start/pack_end→append, container.add→append/set_child - Remove show_all() (widgets visible by default in GTK 4) - set_border_width→margins, get_style_context().add_class→add_css_class - get_toplevel→get_root, Gtk.Window.list_toplevels→get_toplevels - Event signals→controllers (button-press→GestureClick, key-press→EventControllerKey, focus-out→EventControllerFocus, delete-event→close-request) - Gtk.Menu/MenuItem removed→PopoverMenu+Gio.Menu or Gtk.Button - Gtk.FileChooserNative removed→Gtk.FileDialog (async, GTK 4.10+) - Gtk.Clipboard.get→widget.get_clipboard() - Gtk.EntryCompletion removed (not available in GTK 4) - Gtk.StatusIcon/AppIndicator removed (GTK 3 only)→null object stub - Dialog.run() removed→nested GLib.MainLoop compat for sync dialogs - GtkBuilderDialog: builder.connect_signals removed - CellRenderer do_render→do_snapshot bridge via snapshot.append_cairo - gi_composites.py rewritten for GTK 4 template support - All 6 .ui files converted (removed packing, visible props, GTK 3 widgets) - CSS: fixed missing semicolons, updated color variable names - Reset mypy baseline for GTK 4 stub mismatches (pygobject-stubs are GTK 3) Deprecated but functional APIs kept for now (future phases): - Gtk.TreeView, Gtk.IconView, Gtk.CellRenderer, Gtk.ListStore - Gtk.ComboBox Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>