Skip to content

Commit

Permalink
follow iced-0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
shnarazk committed Feb 20, 2024
1 parent d00051c commit c039d8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
chrono = { version = "^0.4" }
clap = { version = "^4.1", features = ["derive", "env"] }
iced = { version = "0.10.0", features = ["wgpu", "tokio", "image"]}
iced = { version = "^0.12", features = ["wgpu", "tokio", "image"]}
once_cell = "^1.19"
reqwest = "0.11.16"
serde_json = { version = "^1.0" }
Expand Down
15 changes: 9 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl Application for NhkView {
($value: expr) => {
row![
text($value.0).width(50),
horizontal_space(30),
horizontal_space(),
text($value.1).width(540),
]
.padding(4)
Expand All @@ -157,9 +157,9 @@ impl Application for NhkView {
macro_rules! row2 {
($value: expr) => {
row![
horizontal_space(30),
horizontal_space(),
text($value.2).size(description_font_size).width(550),
horizontal_space(30),
horizontal_space(),
]
.align_items(Alignment::Start)
};
Expand All @@ -185,7 +185,7 @@ impl Application for NhkView {
}
column![
row(vec![
horizontal_space(1).into(),
horizontal_space().into(),
button!(" NHK 総合", Service::G1),
button!(" NHK Eテレ", Service::E1),
button!(" NHK FM", Service::R3),
Expand Down Expand Up @@ -249,7 +249,10 @@ fn main() -> iced::Result {
}
let mut settings = Settings::default();
settings.default_font.family = font::Family::Name("ヒラギノ角ゴシック");
settings.default_text_size = 13.0;
settings.window.size = (620, 270);
settings.default_text_size = iced::Pixels(13.0);
settings.window.size = iced::Size {
height: 270.0,
width: 620.0,
};
NhkView::run(settings)
}

0 comments on commit c039d8e

Please sign in to comment.