hide scrollbars on sports panes

This commit is contained in:
death916 2026-03-24 05:09:29 -07:00
parent 85f59ed57c
commit 535d1f4110
2 changed files with 7 additions and 5 deletions

View file

@ -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");

View file

@ -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()
} }