mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
@@ -625,7 +625,7 @@ pub struct TextShape {
|
||||
/// Top left corner of the first character.
|
||||
pub pos: Pos2,
|
||||
|
||||
/// The layed out text, from [`Fonts::layout_job`].
|
||||
/// The laid out text, from [`Fonts::layout_job`].
|
||||
pub galley: Arc<Galley>,
|
||||
|
||||
/// Add this underline to the whole text.
|
||||
|
||||
@@ -70,7 +70,7 @@ pub fn layout(fonts: &mut FontsImpl, job: Arc<LayoutJob>) -> Galley {
|
||||
for (i, row) in rows.iter_mut().enumerate() {
|
||||
let is_last_row = i + 1 == num_rows;
|
||||
let justify_row = justify && !row.ends_with_newline && !is_last_row;
|
||||
halign_and_jusitfy_row(
|
||||
halign_and_justify_row(
|
||||
point_scale,
|
||||
row,
|
||||
job.halign,
|
||||
@@ -337,7 +337,7 @@ fn replace_last_glyph_with_overflow_character(
|
||||
}
|
||||
}
|
||||
|
||||
fn halign_and_jusitfy_row(
|
||||
fn halign_and_justify_row(
|
||||
point_scale: PointScale,
|
||||
row: &mut Row,
|
||||
halign: Align,
|
||||
|
||||
@@ -850,7 +850,7 @@ impl Galley {
|
||||
// keep same X coord
|
||||
let x = self.pos_from_cursor(cursor).center().x;
|
||||
let column = if x > self.rows[new_row].rect.right() {
|
||||
// beyond the end of this row - keep same colum
|
||||
// beyond the end of this row - keep same column
|
||||
cursor.rcursor.column
|
||||
} else {
|
||||
self.rows[new_row].char_at(x)
|
||||
|
||||
Reference in New Issue
Block a user