-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
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
Take clip_rect
into account when storing widgets in interact_with_hovered
#4017
Comments
Should we use widget_rect & clip_rect ? |
oh yeah, I forgot to take the clip_rect into account |
clip_rect
into account when storing widgets in interact_with_hovered
okay. sorry about that. i'm ugly english. |
Please test #4020 |
No. The same bug occurs. |
@emilk There was no PR. I copied it and used it and it works well. If you send us a PR, I will test it further and let you know if there are any problems. hello_world main.rs : should be excluded from PR. |
* Bug introduced in emilk#4013 * Closes emilk#4017 Unfortunately this is a breaking change, since it changes the fields of `Response`, so can't do a patch-release with this.
@emilk
Update Issue : #4013
After update #4013, you will no longer be able to click any button on an image (in fact any button) that is not visible on screen when the image is enlarged.
If you read this post, please mark it with an eye emoji.
Reference :
May be,
Should we save the results of all events first?
egui/crates/egui/src/widgets/image.rs : fn ui(self, ui: &mut Ui)
337 line
let (rect, response) = ui.allocate_exact_size(ui_size, self.sense);
to
let (rect, response) = ui.allocate_exact_size(ui_size, egui::Sense::click_and_drag());
it's a good result.
But, One problem found in this case is that the Image in the ScrollArea cannot be dragged with the mouse after being enlarged.
then,
let (rect, response) = ui.allocate_exact_size(ui_size, egui::Sense::click_and_drag());
to
let (rect, response) = ui.allocate_exact_size(ui_size, egui::Sense::click());
it's a good result.
Or, Should it be this way?
First, save all information with click_and_drag().
Then, information is removed according to the Sense settings.
May be, Remove it from the interact() function
Please refer to the contents so far.
The text was updated successfully, but these errors were encountered: