1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

clipboard: fix get_text() on macos

This commit is contained in:
Alexander Medvednikov
2020-11-20 01:08:39 +01:00
parent 925b40e2c0
commit d50c919879
4 changed files with 29 additions and 14 deletions

View File

@@ -114,9 +114,9 @@ pub fn (ctx &Context) draw_text(x int, y int, text_ string, cfg gx.TextCfg) {
}
// text := text_.trim_space() // TODO remove/optimize
mut text := text_
if text.contains('\t') {
text = text.replace('\t', ' ')
}
//if text.contains('\t') {
//text = text.replace('\t', ' ')
//}
ctx.set_cfg(cfg)
scale := if ctx.ft.scale == 0 { f32(1) } else { ctx.ft.scale }
C.fonsDrawText(ctx.ft.fons, x * scale, y * scale, text.str, 0) // TODO: check offsets/alignment