Closed sdgoihew closed 9 months ago
I'm going to attempt to fix this sometime later this week. I managed to reduce your example down to:
fn view(&self) -> Element<'_, self::Message> {
let text_input = TextInput::new("", "");
let content =
Scrollable::new(text_input).direction(Direction::Horizontal(Properties::new()));
content.into()
}
The bug seems related to rounded widgets and Scrollable
s based on the backtrace.
Full example for easy copy and pasting:
use iced::{
widget::{
scrollable::{Direction, Properties},
Scrollable, TextInput,
},
Element, Sandbox, Settings,
};
#[derive(Debug, Clone)]
enum Message {}
struct Example;
impl Sandbox for Example {
type Message = Message;
fn new() -> Self {
Self
}
fn title(&self) -> String {
"Issue 2066".into()
}
fn update(&mut self, _message: Self::Message) {}
fn view(&self) -> Element<'_, self::Message> {
let text_input = TextInput::new("", "");
let content =
Scrollable::new(text_input).direction(Direction::Horizontal(Properties::new()));
content.into()
}
}
fn main() -> iced::Result {
Example::run(Settings::default())
}
Is there an existing issue for this?
Is this issue related to iced?
What happened?
Panic with meaningless explanation (using tiny_skia backend)
Minimized example:
What is the expected behavior?
Compile time error, or sane explanation of what happened
Version
crates.io release
Operating System
Windows
Do you have any log output?