fmt: fix alignment of struct init fields (#22025)

This commit is contained in:
yuyi 2024-08-11 14:11:24 +08:00 committed by GitHub
parent 99da5726db
commit c51d30bf53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
671 changed files with 18817 additions and 18787 deletions

View file

@ -46,12 +46,12 @@ fn new_ft(c FTConfig) ?&FT {
}
return &FT{
fons: fons
fons: fons
font_normal: fons.add_font_mem('sans', bytes_normal, false)
font_bold: fons.add_font_mem('sans', bytes_bold, false)
font_mono: fons.add_font_mem('sans', bytes_mono, false)
font_bold: fons.add_font_mem('sans', bytes_bold, false)
font_mono: fons.add_font_mem('sans', bytes_mono, false)
font_italic: fons.add_font_mem('sans', bytes_italic, false)
scale: c.scale
scale: c.scale
}
} else {
// Load default font
@ -111,12 +111,12 @@ fn new_ft(c FTConfig) ?&FT {
debug_font_println('Font used for font_mono : ${mono_path}')
debug_font_println('Font used for font_italic : ${italic_path}')
return &FT{
fons: fons
fons: fons
font_normal: fons.add_font_mem('sans', bytes, false)
font_bold: fons.add_font_mem('sans', bytes_bold, false)
font_mono: fons.add_font_mem('sans', bytes_mono, false)
font_bold: fons.add_font_mem('sans', bytes_bold, false)
font_mono: fons.add_font_mem('sans', bytes_mono, false)
font_italic: fons.add_font_mem('sans', bytes_italic, false)
scale: c.scale
scale: c.scale
}
}
@ -184,15 +184,15 @@ pub:
pub fn (ctx &Context) draw_text2(p DrawTextParams) {
ctx.draw_text(p.x, p.y, p.text, gx.TextCfg{
color: p.color
size: p.size
align: p.align
color: p.color
size: p.size
align: p.align
vertical_align: p.vertical_align
max_width: p.max_width
family: p.family
bold: p.bold
mono: p.mono
italic: p.italic
max_width: p.max_width
family: p.family
bold: p.bold
mono: p.mono
italic: p.italic
}) // TODO: perf once it's the only function to draw text
}