|
|
@ -273,7 +273,7 @@ impl CursorRenderer {
|
|
|
|
let mut paint = Paint::new(skia_safe::colors::WHITE, None);
|
|
|
|
let mut paint = Paint::new(skia_safe::colors::WHITE, None);
|
|
|
|
paint.set_anti_alias(settings.antialiasing);
|
|
|
|
paint.set_anti_alias(settings.antialiasing);
|
|
|
|
|
|
|
|
|
|
|
|
let character = self.cursor.character.clone();
|
|
|
|
let character = self.cursor.grid_cell.0.clone();
|
|
|
|
|
|
|
|
|
|
|
|
let mut cursor_width = grid_renderer.font_dimensions.width;
|
|
|
|
let mut cursor_width = grid_renderer.font_dimensions.width;
|
|
|
|
if self.cursor.double_width && self.cursor.shape == CursorShape::Block {
|
|
|
|
if self.cursor.double_width && self.cursor.shape == CursorShape::Block {
|
|
|
@ -341,7 +341,9 @@ impl CursorRenderer {
|
|
|
|
self.previous_editor_mode = current_mode.clone();
|
|
|
|
self.previous_editor_mode = current_mode.clone();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if self.cursor.enabled && render {
|
|
|
|
if !(self.cursor.enabled && render) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
// Draw Background
|
|
|
|
// Draw Background
|
|
|
|
let background_color = self
|
|
|
|
let background_color = self
|
|
|
|
.cursor
|
|
|
|
.cursor
|
|
|
@ -372,7 +374,12 @@ impl CursorRenderer {
|
|
|
|
canvas.clip_path(&path, None, Some(false));
|
|
|
|
canvas.clip_path(&path, None, Some(false));
|
|
|
|
|
|
|
|
|
|
|
|
let y_adjustment = grid_renderer.shaper.y_adjustment();
|
|
|
|
let y_adjustment = grid_renderer.shaper.y_adjustment();
|
|
|
|
let blobs = &grid_renderer.shaper.shape_cached(character, false, false);
|
|
|
|
let style = &self.cursor.grid_cell.1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let bold = style.as_ref().map(|x| x.bold).unwrap_or(false);
|
|
|
|
|
|
|
|
let italic = style.as_ref().map(|x| x.italic).unwrap_or(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let blobs = &grid_renderer.shaper.shape_cached(character, bold, italic);
|
|
|
|
|
|
|
|
|
|
|
|
for blob in blobs.iter() {
|
|
|
|
for blob in blobs.iter() {
|
|
|
|
canvas.draw_text_blob(
|
|
|
|
canvas.draw_text_blob(
|
|
|
@ -389,4 +396,3 @@ impl CursorRenderer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|