Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Jan 19, 2025
1 parent 64245a4 commit 53af04e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions xilem/examples/emoji_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,20 @@ fn paginate(

flex((
// TODO: Expose that this is a previous page button to accessibility
(current_start != 0).then(|| button( "<-", move |data| {
*data = current_start.saturating_sub(count_per_page);
})),
(current_start != 0).then(|| {
button("<-", move |data| {
*data = current_start.saturating_sub(count_per_page);
})
}),
label(format!("{percentage_start}% - {percentage_end}%")),
(current_end < max_count).then(|| button("->", move |data| {
let new_idx = current_start + count_per_page;
if new_idx < max_count {
*data = new_idx;
}
})),
(current_end < max_count).then(|| {
button("->", move |data| {
let new_idx = current_start + count_per_page;
if new_idx < max_count {
*data = new_idx;
}
})
}),
))
.direction(Axis::Horizontal)
}
Expand Down

0 comments on commit 53af04e

Please sign in to comment.