Fix scroll_to with align
Broke in https://github.com/emilk/egui/pull/1252
This commit is contained in:
parent
4af3cae26d
commit
4e316d32e5
1 changed files with 1 additions and 1 deletions
|
@ -507,7 +507,7 @@ impl Prepared {
|
|||
// Depending on the alignment we need to add or subtract the spacing
|
||||
spacing *= remap(center_factor, 0.0..=1.0, -1.0..=1.0);
|
||||
|
||||
offset + spacing
|
||||
offset + spacing - state.offset[d]
|
||||
} else if start < clip_start && end < clip_end {
|
||||
-(clip_start - start + spacing).min(clip_end - end - spacing)
|
||||
} else if end > clip_end && start > clip_start {
|
||||
|
|
Loading…
Reference in a new issue