From b851358a95352ef56802479d93046a2d7bedffe9 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 10 Jan 2021 20:26:57 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E5=A4=A7=E9=87=8F=E5=BC=B9?= =?utf8?q?=E5=B9=95=E4=B8=8B=E7=9A=84gtk=E5=BC=B9=E5=B9=95=E7=AA=97?= =?utf8?q?=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/gtk.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Reply/gtk.go b/Reply/gtk.go index e384dc7..fece5a9 100644 --- a/Reply/gtk.go +++ b/Reply/gtk.go @@ -450,8 +450,12 @@ func Gtk_danmu() { } step := (max - cu) / 30 - if step > 0.5 && max - cu < float64(h){ - if step > 5 {step = 5} + if step > 20 { + if i,e := grid0.GetChildAt(0,0); e != nil{i.(*gtk.Widget).Destroy()} + if i,e := grid0.GetChildAt(1,0); e != nil{i.(*gtk.Widget).Destroy()} + grid0.RemoveRow(0) + } else if step > 0.5 { + if step > 5{step = 5} tmp.SetValue(cu + step) } else { in_smooth_roll = false -- 2.39.2