mirror of
https://github.com/Death916/deathclock.git
synced 2026-04-10 03:04:40 -07:00
switch weather placeholder and sizes
This commit is contained in:
parent
d8688b8fc8
commit
1001d60b25
1 changed files with 10 additions and 12 deletions
|
|
@ -60,7 +60,7 @@ impl State {
|
||||||
text(format!("{} vs {}", games[0].team1, games[0].team2)).size(20),
|
text(format!("{} vs {}", games[0].team1, games[0].team2)).size(20),
|
||||||
text(format!("{} - {}", games[0].score1, games[0].score2)).size(20),
|
text(format!("{} - {}", games[0].score1, games[0].score2)).size(20),
|
||||||
]
|
]
|
||||||
.padding(20)
|
.padding(5)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
Pane::NflPane => text("NFL").into(),
|
Pane::NflPane => text("NFL").into(),
|
||||||
|
|
@ -70,8 +70,8 @@ impl State {
|
||||||
let weather_img = image::Handle::from_bytes(state.weather.clone());
|
let weather_img = image::Handle::from_bytes(state.weather.clone());
|
||||||
column![
|
column![
|
||||||
text("Weather").size(50),
|
text("Weather").size(50),
|
||||||
image(weather_img).width(50),
|
image(weather_img).width(100).height(100),
|
||||||
text(state.location.clone()).size(20),
|
text(state.location.clone()).size(30),
|
||||||
]
|
]
|
||||||
.padding(20)
|
.padding(20)
|
||||||
.into()
|
.into()
|
||||||
|
|
@ -87,15 +87,13 @@ impl State {
|
||||||
|
|
||||||
impl Default for State {
|
impl Default for State {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
let text = ureq::get(
|
let text = ureq::get("https://v2.wttr.in/Sacramento.png?u0")
|
||||||
"https://raw.githubusercontent.com/iced-rs/iced/9712b319bb7a32848001b96bd84977430f14b623/examples/resources/ferris.png",
|
.header("User-Agent", "deathclock-app/1.0")
|
||||||
)
|
.call()
|
||||||
.header("User-Agent", "deathclock-app/1.0")
|
.unwrap()
|
||||||
.call()
|
.into_body()
|
||||||
.unwrap()
|
.read_to_vec()
|
||||||
.into_body()
|
.unwrap();
|
||||||
.read_to_vec()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
State {
|
State {
|
||||||
current_time: chrono::Utc::now(),
|
current_time: chrono::Utc::now(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue