diff options
author | 2023-05-02 06:40:48 +0200 | |
---|---|---|
committer | 2023-05-02 06:40:48 +0200 | |
commit | 8e8808f0e187ed6671441f5016f07bfcba426452 (patch) | |
tree | bc4d2eeb57f60e654a4a8ed7c562f79ee507abab /examples | |
parent | 2d7d9a130ece3fb6fa4cd52f9b32b4abd7887cf5 (diff) | |
parent | c8952ee4a1118fe67bfdf40fc77f3ff30f5d0278 (diff) | |
download | iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.gz iced-8e8808f0e187ed6671441f5016f07bfcba426452.tar.bz2 iced-8e8808f0e187ed6671441f5016f07bfcba426452.zip |
Merge branch 'master' into advanced-text
Diffstat (limited to '')
-rw-r--r-- | examples/integration/src/main.rs | 3 | ||||
-rw-r--r-- | examples/scrollable/src/main.rs | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index d9aae7b9..c935aca7 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -102,9 +102,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> { capabilities .formats .iter() - .filter(|format| format.describe().srgb) .copied() - .next() + .find(wgpu::TextureFormat::is_srgb) .or_else(|| capabilities.formats.first().copied()) .expect("Get preferred format"), adapter diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 2e99b1ac..97344c94 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -36,7 +36,7 @@ enum Message { ScrollerWidthChanged(u16), ScrollToBeginning, ScrollToEnd, - Scrolled(scrollable::RelativeOffset), + Scrolled(scrollable::Viewport), } impl Application for ScrollableDemo { @@ -104,8 +104,8 @@ impl Application for ScrollableDemo { self.current_scroll_offset, ) } - Message::Scrolled(offset) => { - self.current_scroll_offset = offset; + Message::Scrolled(viewport) => { + self.current_scroll_offset = viewport.relative_offset(); Command::none() } |