Skip to content

Commit

Permalink
FIX: get layout metrics issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbegin committed Apr 16, 2020
1 parent 50417f6 commit 330e0ab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/view/backends/gtk3/text-box.reds
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,14 @@ OS-text-box-layout: func [
]
len: -1
str: unicode/to-utf8 text :len
pango_layout_set_width layout PANGO_SCALE * size/x
pango_layout_set_height layout PANGO_SCALE * size/y
if TYPE_OF(size) = TYPE_PAIR [
if size/x <> 0 [
pango_layout_set_width layout PANGO_SCALE * size/x
]
if size/y <> 0 [
pango_layout_set_height layout PANGO_SCALE * size/y
]
]
pango_layout_set_wrap layout PANGO_WRAP_WORD_CHAR ;-- TBD: apply para
pango_layout_set_text layout str -1

Expand Down

0 comments on commit 330e0ab

Please sign in to comment.