mirror of
https://github.com/Death916/deathclock.git
synced 2026-04-10 03:04:40 -07:00
hide scrollbars on sports panes
This commit is contained in:
parent
85f59ed57c
commit
535d1f4110
2 changed files with 7 additions and 5 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
use rss::Channel;
|
use rss::Channel;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{BufRead, BufReader};
|
use std::io::{BufRead, BufReader};
|
||||||
use std::str::FromStr;
|
|
||||||
use ureq::http::Response;
|
|
||||||
|
|
||||||
pub async fn get_news() -> Vec<Channel> {
|
pub async fn get_news() -> Vec<Channel> {
|
||||||
let feeds = File::open("../feeds.txt");
|
let feeds = File::open("../feeds.txt");
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ use iced::Element;
|
||||||
use iced::Fill;
|
use iced::Fill;
|
||||||
use iced::widget::{column, container, image, row, scrollable, text};
|
use iced::widget::{column, container, image, row, scrollable, text};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use iced::widget::scrollable::{Direction, Scrollbar};
|
||||||
|
|
||||||
|
|
||||||
use crate::Message;
|
use crate::Message;
|
||||||
use crate::sports::Game;
|
use crate::sports::Game;
|
||||||
|
|
@ -13,7 +15,7 @@ pub fn render_nba_pane<'a>(
|
||||||
games: &'a [Game],
|
games: &'a [Game],
|
||||||
logos: &'a HashMap<String, Handle>,
|
logos: &'a HashMap<String, Handle>,
|
||||||
) -> Element<'a, Message> {
|
) -> Element<'a, Message> {
|
||||||
column(games.iter().map(|game| {
|
scrollable(column(games.iter().map(|game| {
|
||||||
let Some(team1_logo) = logos.get(&game.team1) else {
|
let Some(team1_logo) = logos.get(&game.team1) else {
|
||||||
return text(format!("Error: Team 1 logo not found for {}", game.team1)).into();
|
return text(format!("Error: Team 1 logo not found for {}", game.team1)).into();
|
||||||
};
|
};
|
||||||
|
|
@ -57,8 +59,8 @@ pub fn render_nba_pane<'a>(
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.into()
|
.into()
|
||||||
}))
|
})))
|
||||||
.padding(0)
|
.direction(Direction::Vertical(Scrollbar::hidden()))
|
||||||
.width(50)
|
.width(50)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
@ -119,6 +121,7 @@ pub fn render_mlb_pane<'a>(
|
||||||
})
|
})
|
||||||
.into()
|
.into()
|
||||||
})))
|
})))
|
||||||
|
.direction(Direction::Vertical(Scrollbar::hidden()))
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue