Skip to content

Commit

Permalink
Manuals: Optimize loading docs (#573)
Browse files Browse the repository at this point in the history
* Time

* Create search selection model in UI

* Manuals: Refactor code to load sidebar faster

* Manuals: Changes from review and switch back to CustomSorter
  • Loading branch information
AkshayWarrier authored Sep 12, 2023
1 parent 0dcadc5 commit cd99aaa
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 158 deletions.
14 changes: 13 additions & 1 deletion src/DocumentationViewer.blp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ Adw.Window documentation_viewer {

ListView search_list_view {
enable-rubberband: true;
model: SingleSelection search_model {
model: SortListModel {
sorter: StringSorter search_sorter {};
model: FilterListModel filter_model {
filter: StringFilter filter {
match-mode: substring;
};
};
};
};

factory: BuilderListItemFactory {
template ListItem {
child: Inscription {
Expand All @@ -87,13 +98,14 @@ Adw.Window documentation_viewer {
child: Adw.ToolbarView {
[top]
Adw.HeaderBar {
//show-title: false;
show-title: false;
[start]
Button button_back {
icon-name: "go-previous-symbolic";
tooltip-text: _("Back");
styles ["flat"]
}

[start]
Button button_forward {
icon-name: "go-next-symbolic";
Expand Down
Loading

0 comments on commit cd99aaa

Please sign in to comment.