Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use iced_aw 0.70.0 #2016

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flowr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ wasmtime = { version = "12.0.1", default-features = false, features = ["cranelif

# for flowrgui
iced = { version = "0.10.0", features = ["canvas", "tokio", "debug", "image"] }
iced_aw = { version = "0.6.0", git = "https://github.com/iced-rs/iced_aw.git", branch="main", default-features = false, features = ["tabs", "card", "modal",] }
iced_aw = { version = "0.7.0", default-features = false, features = ["tabs", "card", "modal",] }
iced_native = "0.10.3"
once_cell = "1.18.0"
tokio = { version = "1", features = ["sync"] }
Expand Down
37 changes: 20 additions & 17 deletions flowr/src/bin/flowrgui/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,31 +236,34 @@
}

fn view(&self) -> Element<'_, Message> {
let mut main = Column::new().spacing(10);

main = main
let main = Column::new().spacing(10)

Check warning on line 239 in flowr/src/bin/flowrgui/main.rs

View check run for this annotation

Codecov / codecov/patch

flowr/src/bin/flowrgui/main.rs#L239

Added line #L239 was not covered by tests
.push(self.command_row())
.push(self.tab_set.view())
.push(self.status_row())
.padding(10);

modal(self.show_modal, main,
Card::new(
let overlay = if self.show_modal {
Some(Card::new(

Check warning on line 246 in flowr/src/bin/flowrgui/main.rs

View check run for this annotation

Codecov / codecov/patch

flowr/src/bin/flowrgui/main.rs#L245-L246

Added lines #L245 - L246 were not covered by tests
Text::new(self.modal_content.clone().0),
Text::new(self.modal_content.clone().1),
)
.foot(
Row::new()
.spacing(10)
.padding(5)
.width(Length::Fill)
.push(
Button::new(Text::new("OK")
.horizontal_alignment(Horizontal::Center))
.width(Length::Fill)
.on_press(Message::CloseModal)),
)
.max_width(300.0))
.foot(
Row::new()
.spacing(10)
.padding(5)
.width(Length::Fill)
.push(
Button::new(Text::new("OK")
.horizontal_alignment(Horizontal::Center))
.width(Length::Fill)
.on_press(Message::CloseModal)),
)
.max_width(300.0))

Check warning on line 261 in flowr/src/bin/flowrgui/main.rs

View check run for this annotation

Codecov / codecov/patch

flowr/src/bin/flowrgui/main.rs#L250-L261

Added lines #L250 - L261 were not covered by tests
} else {
None

Check warning on line 263 in flowr/src/bin/flowrgui/main.rs

View check run for this annotation

Codecov / codecov/patch

flowr/src/bin/flowrgui/main.rs#L263

Added line #L263 was not covered by tests
};

modal(main, overlay)

Check warning on line 266 in flowr/src/bin/flowrgui/main.rs

View check run for this annotation

Codecov / codecov/patch

flowr/src/bin/flowrgui/main.rs#L266

Added line #L266 was not covered by tests
.backdrop(Message::CloseModal)
.on_esc(Message::CloseModal)
.into()
Expand Down
Loading