Skip to content

Commit

Permalink
More colors and more stargazers
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Aug 13, 2023
1 parent f3fa696 commit 70dd24c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fancy-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn colors() -> Vec<Color> {
}

fn many_colors() -> Vec<Color> {
let colors = 18;
let colors = 21;

(0..colors)
.map(|i| {
Expand Down
8 changes: 6 additions & 2 deletions fancy-example/src/stargazers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Stargazer {

pub fn load_stargazers(state: Arc<Mutex<StargazersState>>) {
ehttp::fetch(
Request::get("https://api.github.com/repos/lucasmerlin/egui_dnd/stargazers"),
Request::get("https://api.github.com/repos/lucasmerlin/egui_dnd/stargazers?per_page=100"),
move |result| {
if let Ok(data) = result {
if let Ok(stargazers) = serde_json::from_slice::<Vec<Stargazer>>(&data.bytes) {
Expand Down Expand Up @@ -111,13 +111,17 @@ pub fn stargazers_ui(ui: &mut Ui, stargazers: StargazersType) {
.auto_shrink([false, false])
.show(ui, |ui| {
ui.horizontal_wrapped(|ui| {
ui.spacing_mut().item_spacing.x = 0.0;
ui.label("Like");
ui.hyperlink_to(
"egui_dnd on GitHub",
" egui_dnd on GitHub ",
"https://github.com/lucasmerlin/egui_dnd",
);
ui.label("to be listed here!");
});
ui.horizontal_wrapped(|ui| {
ui.label("On mobile you can drag to scroll and hold + drag to sort items.");
});

match &mut *guard {
StargazersState::None => {
Expand Down

0 comments on commit 70dd24c

Please sign in to comment.