mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Don't round row sizes again in Galley::concat
This commit is contained in:
@@ -774,9 +774,11 @@ impl Galley {
|
|||||||
|
|
||||||
pub(crate) fn round_output_to_gui(&mut self) {
|
pub(crate) fn round_output_to_gui(&mut self) {
|
||||||
for placed_row in &mut self.rows {
|
for placed_row in &mut self.rows {
|
||||||
// NOTE: we round the size, but not the position, because the position should be _pixel_ aligned.
|
// Optimization: only call `make_mut` if necessary (can cause a deep clone)
|
||||||
let row = Arc::make_mut(&mut placed_row.row);
|
let rounded_size = placed_row.row.size.round_ui();
|
||||||
row.size = row.size.round_ui();
|
if placed_row.row.size != rounded_size {
|
||||||
|
Arc::make_mut(&mut placed_row.row).size = rounded_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let rect = &mut self.rect;
|
let rect = &mut self.rect;
|
||||||
|
|||||||
Reference in New Issue
Block a user