Skip to content

Commit 2e4e318

Browse files
committed
Various improvements to Library
1 parent 26e63a1 commit 2e4e318

File tree

4 files changed

+93
-241
lines changed

4 files changed

+93
-241
lines changed

build-aux/library.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ const demos = [];
9595
demos.push(demo);
9696
}
9797

98+
demos.sort((a, b) => {
99+
if (a.name === "Welcome") return -1;
100+
if (b.name === "Welcome") return 1;
101+
if (a.name === "Platform Tools") return -1;
102+
if (b.name === "Platform Tools") return 1;
103+
else return a.name.localeCompare(b.name);
104+
});
105+
98106
await Gio.File.new_for_path(pkgdatadir)
99107
.get_child("demos/index.json")
100108
.replace_contents_async(

demos

src/Library/Library.blp

Lines changed: 6 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Adw.Window window {
1616
};
1717
}
1818

19-
content: ScrolledWindow {
19+
content: ScrolledWindow scrolled_window {
2020
hscrollbar-policy: never;
2121

2222
child: Adw.Clamp {
@@ -63,159 +63,17 @@ Adw.Window window {
6363

6464
DropDown dropdown_language {
6565
valign: end;
66+
model: Gtk.StringList {};
6667
}
6768

6869
DropDown dropdown_category {
6970
valign: end;
71+
model: Gtk.StringList {};
7072
}
7173
}
7274
}
7375

74-
ListBox library_uncategorized {
75-
selection-mode: none;
76-
77-
styles [
78-
"boxed-list"
79-
]
80-
}
81-
82-
Label label_tools {
83-
label: _("Tools");
84-
halign: start;
85-
margin-top: 12;
86-
87-
styles [
88-
"title-4"
89-
]
90-
}
91-
92-
ListBox library_tools {
93-
selection-mode: none;
94-
95-
styles [
96-
"boxed-list"
97-
]
98-
}
99-
100-
Label label_network {
101-
label: _("Network");
102-
halign: start;
103-
margin-top: 12;
104-
105-
styles [
106-
"title-4"
107-
]
108-
}
109-
110-
ListBox library_network {
111-
selection-mode: none;
112-
113-
styles [
114-
"boxed-list"
115-
]
116-
}
117-
118-
Label label_controls {
119-
label: _("Controls");
120-
halign: start;
121-
margin-top: 12;
122-
123-
styles [
124-
"title-4"
125-
]
126-
}
127-
128-
ListBox library_controls {
129-
selection-mode: none;
130-
131-
styles [
132-
"boxed-list"
133-
]
134-
}
135-
136-
Label label_layout {
137-
label: _("Layout");
138-
halign: start;
139-
margin-top: 12;
140-
141-
styles [
142-
"title-4"
143-
]
144-
}
145-
146-
ListBox library_layout {
147-
selection-mode: none;
148-
149-
styles [
150-
"boxed-list"
151-
]
152-
}
153-
154-
Label label_feedback {
155-
label: _("Feedback");
156-
halign: start;
157-
margin-top: 12;
158-
159-
styles [
160-
"title-4"
161-
]
162-
}
163-
164-
ListBox library_feedback {
165-
selection-mode: none;
166-
167-
styles [
168-
"boxed-list"
169-
]
170-
}
171-
172-
Label label_navigation {
173-
label: _("Navigation");
174-
halign: start;
175-
margin-top: 12;
176-
177-
styles [
178-
"title-4"
179-
]
180-
}
181-
182-
ListBox library_navigation {
183-
selection-mode: none;
184-
185-
styles [
186-
"boxed-list"
187-
]
188-
}
189-
190-
Label label_user_interface {
191-
label: _("User Interface");
192-
halign: start;
193-
margin-top: 12;
194-
195-
styles [
196-
"title-4"
197-
]
198-
}
199-
200-
ListBox library_user_interface {
201-
selection-mode: none;
202-
203-
styles [
204-
"boxed-list"
205-
]
206-
}
207-
208-
Label label_platform {
209-
label: _("Platform APIs");
210-
halign: start;
211-
margin-top: 12;
212-
213-
styles [
214-
"title-4"
215-
]
216-
}
217-
218-
ListBox library_platform {
76+
ListBox listbox {
21977
selection-mode: none;
22078

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

242100
styles [
243-
"title-4"
101+
"title-3"
244102
]
245103
}
246104

247105
Button button_reset {
248106
label: _("Reset filters");
249107
halign: center;
108+
styles ["pill"]
250109
}
251110
}
252111

0 commit comments

Comments
 (0)