Fix rendering
This commit is contained in:
@@ -22,7 +22,11 @@ impl Context {
|
||||
}
|
||||
|
||||
pub fn itemize(&self, line: &StyledLine) -> Vec<sys_pango::Item> {
|
||||
sys_pango::pango_itemize(&self.pango_context, line.line_str.trim_right(), &line.attr_list)
|
||||
sys_pango::pango_itemize(
|
||||
&self.pango_context,
|
||||
line.line_str.trim_right(),
|
||||
&line.attr_list,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,10 +43,14 @@ pub fn render(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn shape_dirty(ctx: &context::Context, ui_model: &mut ui_model::UiModel) {
|
||||
pub fn shape_dirty(
|
||||
ctx: &context::Context,
|
||||
ui_model: &mut ui_model::UiModel,
|
||||
color_model: &color::ColorModel,
|
||||
) {
|
||||
for line in ui_model.model_mut() {
|
||||
if line.dirty_line {
|
||||
let styled_line = ui_model::StyledLine::from(line);
|
||||
let styled_line = ui_model::StyledLine::from(line, color_model);
|
||||
let items = ctx.itemize(&styled_line);
|
||||
line.merge(&styled_line, &items);
|
||||
|
||||
@@ -77,4 +81,3 @@ pub fn shape_dirty(ctx: &context::Context, ui_model: &mut ui_model::UiModel) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user