Merge branch 'master' into advanced-text
This commit is contained in:
commit
8e8808f0e1
12 changed files with 173 additions and 70 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue