From 535d1f41109e49c8cec1a9f0b0148d234f43c115 Mon Sep 17 00:00:00 2001 From: death916 Date: Tue, 24 Mar 2026 05:09:29 -0700 Subject: [PATCH] hide scrollbars on sports panes --- rustclock/src/news.rs | 3 +-- rustclock/src/panes.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rustclock/src/news.rs b/rustclock/src/news.rs index 3c1b15b..6c5e162 100644 --- a/rustclock/src/news.rs +++ b/rustclock/src/news.rs @@ -1,8 +1,7 @@ use rss::Channel; use std::fs::File; use std::io::{BufRead, BufReader}; -use std::str::FromStr; -use ureq::http::Response; + pub async fn get_news() -> Vec { let feeds = File::open("../feeds.txt"); diff --git a/rustclock/src/panes.rs b/rustclock/src/panes.rs index 633b9b2..f2f097b 100644 --- a/rustclock/src/panes.rs +++ b/rustclock/src/panes.rs @@ -4,6 +4,8 @@ use iced::Element; use iced::Fill; use iced::widget::{column, container, image, row, scrollable, text}; use std::collections::HashMap; +use iced::widget::scrollable::{Direction, Scrollbar}; + use crate::Message; use crate::sports::Game; @@ -13,7 +15,7 @@ pub fn render_nba_pane<'a>( games: &'a [Game], logos: &'a HashMap, ) -> Element<'a, Message> { - column(games.iter().map(|game| { + scrollable(column(games.iter().map(|game| { let Some(team1_logo) = logos.get(&game.team1) else { return text(format!("Error: Team 1 logo not found for {}", game.team1)).into(); }; @@ -57,8 +59,8 @@ pub fn render_nba_pane<'a>( }, }) .into() - })) - .padding(0) + }))) + .direction(Direction::Vertical(Scrollbar::hidden())) .width(50) .into() } @@ -119,6 +121,7 @@ pub fn render_mlb_pane<'a>( }) .into() }))) + .direction(Direction::Vertical(Scrollbar::hidden())) .into() }