mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
e35533859c
commit
89a7ef04c7
23 files changed
+410
-114
No files matched your search
@@ -741,7 +741,7 @@ func (e *Editor) promoteTextValue(t TextObject) (RichText, error) {
|
||||
}
|
||||
color = fmt.Sprintf("%d %d %d", r>>8, g>>8, b>>8)
|
||||
}
|
||||
result := RichText{AutoWidth: t.layout == nil, Runs: []RichTextRun{{Text: value, Format: TextFormat{Font: t.Font, Size: t.Size, Color: color, Bold: t.Weight == 700, Italic: t.Italic}}}, Layout: layout}
|
||||
result := RichText{AutoWidth: t.layout == nil || t.layout.autoWidth, Runs: []RichTextRun{{Text: value, Format: TextFormat{Font: t.Font, Size: t.Size, Color: color, Bold: t.Weight == 700, Italic: t.Italic}}}, Layout: layout}
|
||||
return result, result.Validate()
|
||||
}
|
||||
|
||||
@@ -1192,7 +1192,7 @@ func (e *Editor) PrepareRichText(page int, path ObjectPath, reflow bool) (RichTe
|
||||
if err != nil {
|
||||
return RichText{}, Box{}, Matrix{}, err
|
||||
}
|
||||
autoWidth := text.layout == nil
|
||||
autoWidth := text.layout == nil || text.layout.autoWidth
|
||||
if reflow {
|
||||
value, layout := text.TextLayout()
|
||||
layout.AutoBidi = true
|
||||
|
||||
Reference in new issue
Block a user