Skip to content

Commit ee6259a

Browse files
committed
Homogeneous
1 parent 1ec8192 commit ee6259a

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

ags/apps/emoji/main.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ function RecentPage() {
130130
});
131131
box.hook(recent, (self) => {
132132
Utils.idle(() => {
133-
const flow = Widget.FlowBox();
133+
const flow = Widget.FlowBox({
134+
homogeneous: true
135+
});
136+
flow.set_min_children_per_line(5);
137+
flow.set_max_children_per_line(25);
134138
for (const emojiKey in recent.value) {
135139
let emoji = emojiList[emojiKey];
136-
flow.set_min_children_per_line(5);
137-
flow.set_max_children_per_line(25);
138140
flow.add(Widget.Button({
139141
class_name: "standard_icon_button emoji",
140142
label: emoji,
@@ -170,11 +172,13 @@ function SearchPage(search: VType<string>) {
170172
Utils.idle(() => {
171173
if (search.value.length == 0)
172174
return
173-
const flow = Widget.FlowBox();
175+
const flow = Widget.FlowBox({
176+
homogeneous: true
177+
});
178+
flow.set_min_children_per_line(5);
179+
flow.set_max_children_per_line(25);
174180
for (const emojiKey in emojiList) {
175181
let emoji = emojiList[emojiKey];
176-
flow.set_min_children_per_line(5);
177-
flow.set_max_children_per_line(25);
178182
if (searchString(emojiKey, search.value))
179183
flow.add(Widget.Button({
180184
class_name: "standard_icon_button emoji",
@@ -215,12 +219,14 @@ function Page(category) {
215219
hpack: "start",
216220
}), false, false, 0
217221
)
218-
const flow = Widget.FlowBox();
222+
const flow = Widget.FlowBox({
223+
homogeneous: true
224+
});
225+
flow.set_min_children_per_line(5);
226+
flow.set_max_children_per_line(25);
219227
let emojis = category[subcategoryKey];
220228
for (let emojiKey in emojis) {
221229
let emoji = emojis[emojiKey];
222-
flow.set_min_children_per_line(5);
223-
flow.set_max_children_per_line(25);
224230
flow.add(Widget.Button({
225231
class_name: "standard_icon_button emoji",
226232
label: emoji,

0 commit comments

Comments
 (0)