-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #679 from mjakeman/accessibility-improvements
Accessibility Improvements
- Loading branch information
Showing
27 changed files
with
925 additions
and
1,076 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,107 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $ExmBrowsePage : Gtk.Widget { | ||
notify::manager => $on_bind_manager(); | ||
|
||
Gtk.ScrolledWindow { | ||
Adw.StatusPage { | ||
title: _("Search for Extensions"); | ||
description: _("Enter a keyword to search 'extensions.gnome.org' for GNOME Shell Extensions"); | ||
valign: start; | ||
vexpand: true; | ||
|
||
child: Adw.Clamp { | ||
Gtk.Box { | ||
orientation: vertical; | ||
|
||
Gtk.Box { | ||
styles ["linked"] | ||
|
||
Gtk.SearchEntry search_entry { | ||
hexpand: true; | ||
search-delay: 750; | ||
realize => $on_search_entry_realize(); | ||
search-changed => $on_search_changed() swapped; | ||
changed => $gtk_widget_grab_focus(); | ||
} | ||
|
||
// Keep the same order as the ExmSearchSort enum | ||
Gtk.DropDown search_dropdown { | ||
model: StringList { | ||
// Translators: dropdown items for sorting search results | ||
strings [_("Relevance"), C_("Sort search results", "Downloads"), _("Recent"), _("Name")] | ||
}; | ||
notify::selected => $on_search_changed() swapped; | ||
} | ||
} | ||
|
||
Gtk.Stack search_stack { | ||
Gtk.StackPage { | ||
name: "page_spinner"; | ||
child: Gtk.Spinner { | ||
valign: center; | ||
halign: center; | ||
spinning: true; | ||
height-request: 32; | ||
width-request: 32; | ||
}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "page_results"; | ||
child: Gtk.Box { | ||
orientation: vertical; | ||
|
||
Gtk.ListBox search_results { | ||
styles ["boxed-list"] | ||
valign: start; | ||
selection-mode: none; | ||
} | ||
|
||
Gtk.Button more_results_btn { | ||
label: _("_Load More Results"); | ||
halign: center; | ||
margin-top: 24; | ||
use-underline: true; | ||
clicked => $on_load_more_results(); | ||
} | ||
}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "page_empty"; | ||
child: Gtk.Label { | ||
label: _("No Results Found"); | ||
valign: start; | ||
halign: center; | ||
}; | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
template $ExmBrowsePage: Gtk.Widget { | ||
notify::manager => $on_bind_manager(); | ||
|
||
Gtk.ScrolledWindow { | ||
Adw.StatusPage status_page { | ||
title: _("Search for Extensions"); | ||
description: _("Enter a keyword to search 'extensions.gnome.org' for GNOME Shell Extensions"); | ||
valign: start; | ||
vexpand: true; | ||
|
||
child: Adw.Clamp { | ||
Gtk.Box { | ||
orientation: vertical; | ||
|
||
Gtk.Box { | ||
styles [ | ||
"linked" | ||
] | ||
|
||
Gtk.SearchEntry search_entry { | ||
hexpand: true; | ||
search-delay: 750; | ||
realize => $on_search_entry_realize(); | ||
search-changed => $on_search_changed() swapped; | ||
changed => $gtk_widget_grab_focus(); | ||
|
||
accessibility { | ||
labelled-by: status_page; | ||
} | ||
} | ||
|
||
// Keep the same order as the ExmSearchSort enum | ||
Gtk.DropDown search_dropdown { | ||
model: StringList { | ||
// Translators: dropdown items for sorting search results | ||
strings [ | ||
_("Relevance"), | ||
C_("Sort search results", "Downloads"), | ||
_("Recent"), | ||
_("Name") | ||
] | ||
}; | ||
|
||
notify::selected => $on_search_changed() swapped; | ||
|
||
accessibility { | ||
description: _("Sort search results"); | ||
} | ||
} | ||
} | ||
|
||
Gtk.Stack search_stack { | ||
Gtk.StackPage { | ||
name: "page_spinner"; | ||
|
||
child: Gtk.Spinner { | ||
valign: center; | ||
halign: center; | ||
spinning: true; | ||
height-request: 32; | ||
width-request: 32; | ||
}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "page_results"; | ||
|
||
child: Gtk.Box { | ||
orientation: vertical; | ||
|
||
Gtk.ListBox search_results { | ||
styles [ | ||
"boxed-list" | ||
] | ||
|
||
valign: start; | ||
selection-mode: none; | ||
} | ||
|
||
Gtk.Button more_results_btn { | ||
label: _("_Load More Results"); | ||
halign: center; | ||
margin-top: 24; | ||
use-underline: true; | ||
clicked => $on_load_more_results(); | ||
} | ||
}; | ||
} | ||
|
||
Gtk.StackPage { | ||
name: "page_empty"; | ||
|
||
child: Gtk.Label { | ||
label: _("No Results Found"); | ||
valign: start; | ||
halign: center; | ||
}; | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.