Skip to content
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

Fix StripBuilder not allocating its used space #3957

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

IVAN-MK7
Copy link
Contributor

@IVAN-MK7 IVAN-MK7 commented Feb 3, 2024

At crates\egui_extras\src\layout.rs :

Allocate allocation_rect instead of max_rect.
Go back from this:

let response = self.ui.allocate_rect(max_rect, self.sense);
let response = response.with_new_rect(allocation_rect);
return (used_rect, response)

to this:

let response = self.ui.allocate_rect(allocation_rect, self.sense);
return (used_rect, response)

In order to allocate the

Closes #3956.

@emilk
Copy link
Owner

emilk commented Feb 5, 2024

The reverted code was introduced in:

It seems like table row selection still works after reverting those lines, so 👍

@emilk emilk changed the title Rollback to 37762f7 egui_extras::layout::StripLayout::add()'s allocate_rect() strategy Fix StripBuilder not allocating its used space Feb 5, 2024
@emilk emilk merged commit a6a9501 into emilk:master Feb 5, 2024
19 of 20 checks passed
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
At crates\egui_extras\src\layout.rs :

Allocate allocation_rect instead of max_rect.
Go back from this:
```
let response = self.ui.allocate_rect(max_rect, self.sense);
let response = response.with_new_rect(allocation_rect);
return (used_rect, response)
```

to this:
```
let response = self.ui.allocate_rect(allocation_rect, self.sense);
return (used_rect, response)
```

In order to allocate the

Closes <emilk#3956>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StripBuilder fails to allocate rect
2 participants