Skip to content

Commit

Permalink
Merge pull request #150 from hecrj/update/iced
Browse files Browse the repository at this point in the history
Update `iced` to official `master`
  • Loading branch information
tarkah authored Jul 13, 2023
2 parents a78540b + 76b25c5 commit 4547ba1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ embed-resource = "2.1.1"
members = ["data"]

[patch.crates-io]
iced = { git = "https://github.com/tarkah/iced", rev = "bcf1ee1bb853bc62fc709d71fa37de1ab6fea6e1" }
iced_core = { git = "https://github.com/tarkah/iced", rev = "bcf1ee1bb853bc62fc709d71fa37de1ab6fea6e1" }
iced = { git = "https://github.com/iced-rs/iced", rev = "fca8373516cdaefcb8595b4d544407792a4cfcc0" }
iced_core = { git = "https://github.com/iced-rs/iced", rev = "fca8373516cdaefcb8595b4d544407792a4cfcc0" }
11 changes: 4 additions & 7 deletions src/buffer/scroll_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,13 @@ impl Status {
let old = self.alignment();
let new = other.alignment();

let absolute_offset = viewport.absolute_offset();

if old != new {
let scrollable::AbsoluteOffset { x, y } = absolute_offset;

let scroll_height = (viewport.content_bounds.height - viewport.bounds.height).max(0.0);
let offset = viewport.absolute_offset();
let reversed_offset = viewport.absolute_offset_reversed();

Some(scrollable::AbsoluteOffset {
x,
y: (scroll_height - y).max(0.0),
x: offset.x,
y: reversed_offset.y,
})
} else {
None
Expand Down

0 comments on commit 4547ba1

Please sign in to comment.