diff --git a/data/cartridges.gresource.xml.in b/data/cartridges.gresource.xml.in index 4c2ab68..eec0c69 100644 --- a/data/cartridges.gresource.xml.in +++ b/data/cartridges.gresource.xml.in @@ -2,13 +2,12 @@ @APP_ID@.metainfo.xml - gtk/window.ui - gtk/help-overlay.ui + gtk/details-dialog.ui gtk/game.ui gtk/preferences.ui - gtk/details-dialog.ui + gtk/window.ui + gtk/shortcuts-dialog.ui gtk/style.css - gtk/style-dark.css library_placeholder.svg library_placeholder_small.svg diff --git a/data/gtk/help-overlay.blp b/data/gtk/help-overlay.blp deleted file mode 100644 index b5c3428..0000000 --- a/data/gtk/help-overlay.blp +++ /dev/null @@ -1,73 +0,0 @@ -using Gtk 4.0; - -ShortcutsWindow help_overlay { - modal: true; - - ShortcutsSection { - section-name: "shortcuts"; - max-height: 10; - - ShortcutsGroup { - title: _("General"); - - ShortcutsShortcut { - title: _("Search"); - action-name: "win.toggle_search"; - } - - ShortcutsShortcut { - title: _("Preferences"); - action-name: "app.preferences"; - } - - ShortcutsShortcut { - title: _("Keyboard Shortcuts"); - action-name: "win.show-help-overlay"; - } - - ShortcutsShortcut { - title: _("Undo"); - action-name: "win.undo"; - } - - ShortcutsShortcut { - title: _("Quit"); - action-name: "app.quit"; - } - - ShortcutsShortcut { - title: _("Toggle Sidebar"); - action-name: "win.show_sidebar"; - } - - ShortcutsShortcut { - title: _("Main Menu"); - action-name: "win.open_menu"; - } - } - - ShortcutsGroup { - title: _("Games"); - - ShortcutsShortcut { - title: _("Add Game"); - action-name: "app.add_game"; - } - - ShortcutsShortcut { - title: _("Import"); - action-name: "app.import"; - } - - ShortcutsShortcut { - title: _("Show Hidden Games"); - action-name: "win.show_hidden"; - } - - ShortcutsShortcut { - title: _("Remove Game"); - action-name: "app.remove_game_details_view"; - } - } - } -} diff --git a/data/gtk/shortcuts-dialog.blp b/data/gtk/shortcuts-dialog.blp new file mode 100644 index 0000000..4439229 --- /dev/null +++ b/data/gtk/shortcuts-dialog.blp @@ -0,0 +1,67 @@ +using Gtk 4.0; +using Adw 1; + +Adw.ShortcutsDialog shortcuts_dialog { + Adw.ShortcutsSection { + title: _("General"); + + Adw.ShortcutsItem { + title: _("Search"); + action-name: "win.toggle_search"; + } + + Adw.ShortcutsItem { + title: _("Preferences"); + action-name: "app.preferences"; + } + + Adw.ShortcutsItem { + title: _("Keyboard Shortcuts"); + action-name: "app.shortcuts"; + } + + Adw.ShortcutsItem { + title: _("Undo"); + action-name: "win.undo"; + } + + Adw.ShortcutsItem { + title: _("Quit"); + action-name: "app.quit"; + } + + Adw.ShortcutsItem { + title: _("Toggle Sidebar"); + action-name: "win.show_sidebar"; + } + + Adw.ShortcutsItem { + title: _("Main Menu"); + action-name: "win.open_menu"; + } + } + + Adw.ShortcutsSection { + title: _("Games"); + + Adw.ShortcutsItem { + title: _("Add Game"); + action-name: "app.add_game"; + } + + Adw.ShortcutsItem { + title: _("Import"); + action-name: "app.import"; + } + + Adw.ShortcutsItem { + title: _("Show Hidden Games"); + action-name: "win.show_hidden"; + } + + Adw.ShortcutsItem { + title: _("Remove Game"); + action-name: "app.remove_game_details_view"; + } + } +} diff --git a/data/gtk/style.css b/data/gtk/style.css index 28498ef..a549e69 100644 --- a/data/gtk/style.css +++ b/data/gtk/style.css @@ -3,11 +3,31 @@ --accent-bg-color: var(--purple-3); } +.no-hover > flowboxchild:hover { + background-color: transparent; +} + #details_view { - background-color: white; + background-color: white; } #details_view_play_button { - color: white; - background-color: rgba(0, 0, 0, .8); + color: white; + background-color: rgba(0, 0, 0, 0.8); +} + +@media (prefers-color-scheme: dark) { + :root { + --accent-color: var(--purple-1); + --accent-bg-color: var(--purple-4); + } + + #details_view { + background-color: black; + } + + #details_view_play_button { + color: rgba(0, 0, 0, 0.8); + background-color: white; + } } diff --git a/data/gtk/window.blp b/data/gtk/window.blp index 93cc02b..166c5b1 100644 --- a/data/gtk/window.blp +++ b/data/gtk/window.blp @@ -246,6 +246,10 @@ template $CartridgesWindow: Adw.ApplicationWindow { margin-start: 15; margin-end: 15; selection-mode: none; + + styles [ + "no-hover", + ] } } } @@ -306,6 +310,10 @@ Adw.NavigationPage hidden_library_page { margin-start: 15; margin-end: 15; selection-mode: none; + + styles [ + "no-hover", + ] } } } @@ -541,7 +549,7 @@ menu primary_menu { section { item (_("Preferences"), "app.preferences") - item (_("Keyboard Shortcuts"), "win.show-help-overlay") + item (_("Keyboard Shortcuts"), "app.shortcuts") item (_("About Cartridges"), "app.about") } } diff --git a/data/meson.build b/data/meson.build index 170bed8..ea17413 100644 --- a/data/meson.build +++ b/data/meson.build @@ -3,8 +3,8 @@ blueprints = custom_target( input: files( 'gtk/details-dialog.blp', 'gtk/game.blp', - 'gtk/help-overlay.blp', 'gtk/preferences.blp', + 'gtk/shortcuts-dialog.blp', 'gtk/window.blp', ), output: '.', diff --git a/data/page.kramo.Cartridges.metainfo.xml.in b/data/page.kramo.Cartridges.metainfo.xml.in index 8282d7c..58777b0 100644 --- a/data/page.kramo.Cartridges.metainfo.xml.in +++ b/data/page.kramo.Cartridges.metainfo.xml.in @@ -54,6 +54,11 @@ + + +

Updated for GNOME 49, using the new keyboard shortcuts dialog.

+
+

Removed an option used for debugging that would accidentally show up for all users.

diff --git a/meson.build b/meson.build index 4b2f881..321b30f 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project( 'cartridges', - version: '2.12.1', + version: '2.13', meson_version: '>= 0.59.0', default_options: [ 'warning_level=2', diff --git a/po/POTFILES b/po/POTFILES index 4d01c91..d67a70e 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -4,8 +4,8 @@ data/page.kramo.Cartridges.metainfo.xml.in data/gtk/details-dialog.blp data/gtk/game.blp -data/gtk/help-overlay.blp data/gtk/preferences.blp +data/gtk/shortcuts-dialog.blp data/gtk/window.blp cartridges/main.py