Skip to content

Commit

Permalink
Various improvements to Library
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Sep 26, 2024
1 parent 26e63a1 commit 2e4e318
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 241 deletions.
8 changes: 8 additions & 0 deletions build-aux/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ const demos = [];
demos.push(demo);
}

demos.sort((a, b) => {
if (a.name === "Welcome") return -1;
if (b.name === "Welcome") return 1;
if (a.name === "Platform Tools") return -1;
if (b.name === "Platform Tools") return 1;
else return a.name.localeCompare(b.name);
});

await Gio.File.new_for_path(pkgdatadir)
.get_child("demos/index.json")
.replace_contents_async(
Expand Down
2 changes: 1 addition & 1 deletion demos
Submodule demos updated 1 files
+1 −1 src/Welcome/main.json
153 changes: 6 additions & 147 deletions src/Library/Library.blp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Adw.Window window {
};
}

content: ScrolledWindow {
content: ScrolledWindow scrolled_window {
hscrollbar-policy: never;

child: Adw.Clamp {
Expand Down Expand Up @@ -63,159 +63,17 @@ Adw.Window window {

DropDown dropdown_language {
valign: end;
model: Gtk.StringList {};
}

DropDown dropdown_category {
valign: end;
model: Gtk.StringList {};
}
}
}

ListBox library_uncategorized {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_tools {
label: _("Tools");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_tools {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_network {
label: _("Network");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_network {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_controls {
label: _("Controls");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_controls {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_layout {
label: _("Layout");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_layout {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_feedback {
label: _("Feedback");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_feedback {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_navigation {
label: _("Navigation");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_navigation {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_user_interface {
label: _("User Interface");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_user_interface {
selection-mode: none;

styles [
"boxed-list"
]
}

Label label_platform {
label: _("Platform APIs");
halign: start;
margin-top: 12;

styles [
"title-4"
]
}

ListBox library_platform {
ListBox listbox {
selection-mode: none;

styles [
Expand All @@ -240,13 +98,14 @@ Adw.Window window {
label: _("No results");

styles [
"title-4"
"title-3"
]
}

Button button_reset {
label: _("Reset filters");
halign: center;
styles ["pill"]
}
}

Expand Down
Loading

0 comments on commit 2e4e318

Please sign in to comment.