Update: catatan rilis dirender sebagai markdown (bukan teks mentah)
Catatan rilis GitHub memakai markdown; blok kode dan daftar sekarang tampil rapi di dialog update (widget.NewRichTextFromMarkdown).
This commit is contained in:
1 parent
fbf7344b09
commit
0a53029a0b
1 file changed
+3
-3
@@ -97,9 +97,9 @@ func (ui *app) markUpdatePending(rel update.Release) {
|
|||||||
|
|
||||||
// showUpdateDialog menawarkan update: unduh sekarang, buka halaman rilis, atau nanti.
|
// showUpdateDialog menawarkan update: unduh sekarang, buka halaman rilis, atau nanti.
|
||||||
func (ui *app) showUpdateDialog(rel update.Release) {
|
func (ui *app) showUpdateDialog(rel update.Release) {
|
||||||
notes := widget.NewLabel(rel.Notes)
|
// catatan rilis GitHub berformat markdown; render supaya blok kode/daftar
|
||||||
notes.Wrapping = fyne.TextWrapWord
|
// tidak tampil sebagai teks mentah
|
||||||
notes.Importance = widget.LowImportance
|
notes := widget.NewRichTextFromMarkdown(rel.Notes)
|
||||||
|
|
||||||
// catatan rilis di tengah (bukan top): VScroll di Fyne punya MinSize kecil,
|
// catatan rilis di tengah (bukan top): VScroll di Fyne punya MinSize kecil,
|
||||||
// jadi kalau dipasang sebagai top dari Border isinya terpotong.
|
// jadi kalau dipasang sebagai top dari Border isinya terpotong.
|
||||||
|
|||||||
Reference in new issue
Block a user