We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MouseArea
Rich
G'day,
Have noticed that MouseArea does not seem to fire off on_press messages with the Rich text widget (but works as expected with regular Text widget).
on_press
My use case is creating a clickable hyperlink - I was using Rich text to get an underline.
Possibly has some crossover with #2743.
Here's a reproducible sample (main.rs with iced 0.13.1 in Cargo.toml).
#[derive(Debug, Clone)] enum Message { TextPressed, RichTextPressed, } fn main() { iced::run("Test", update, view).unwrap(); } fn update(_: &mut (), message: Message) { match message { Message::TextPressed => println!("Text pressed"), Message::RichTextPressed => println!("Rich text pressed"), } } fn view(_: &()) -> iced::Element<Message> { iced::widget::row![ iced::widget::mouse_area(iced::widget::text("Clickable text")) .on_press(Message::TextPressed), iced::widget::mouse_area(iced::widget::rich_text([iced::widget::span( "Clickable rich text" )])) .on_press(Message::RichTextPressed), ] .into() }
Cheers Nick
Expected - MouseArea on_press events are fired when Rich text wrapped in MouseArea is pressed.
crates.io release
Linux
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your issue REALLY a bug?
Is there an existing issue for this?
Is this issue related to iced?
What happened?
G'day,
Have noticed that MouseArea does not seem to fire off
on_press
messages with the Rich text widget (but works as expected with regular Text widget).My use case is creating a clickable hyperlink - I was using Rich text to get an underline.
Possibly has some crossover with #2743.
Here's a reproducible sample (main.rs with iced 0.13.1 in Cargo.toml).
Cheers Nick
What is the expected behavior?
Expected - MouseArea on_press events are fired when Rich text wrapped in MouseArea is pressed.
Version
crates.io release
Operating System
Linux
Do you have any log output?
The text was updated successfully, but these errors were encountered: