diff options
| author | Jeff Carr <[email protected]> | 2024-01-11 20:37:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-11 20:37:39 -0600 |
| commit | 5351099972a0fab777a7ac17a3caccccd0ae562f (patch) | |
| tree | 5f3ef6cd7827cf1e87f10b53df84d74708434306 /durationSlider.go | |
| parent | b6d0521996572f0eebd6ff039e80a29fcaeb853b (diff) | |
gui api updatesv0.10.3
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'durationSlider.go')
| -rw-r--r-- | durationSlider.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/durationSlider.go b/durationSlider.go index 97aeb53..819fe50 100644 --- a/durationSlider.go +++ b/durationSlider.go @@ -49,7 +49,7 @@ func (n *Duration) Set(d time.Duration) { offset = d - n.Low i := int(offset / step) log.Log(INFO, "duration.Set() =", n.Low, n.High, d, "i =", i) - n.s.I = i + // n.s.I = i n.s.Set(i) n.s.Custom() } @@ -66,7 +66,7 @@ func NewDurationSlider(n *gui.Node, label string, low time.Duration, high time.D d.l = n.NewLabel(label) d.s = n.NewSlider(label, 0, 1000) d.s.Custom = func () { - d.Duration = low + (high - low) * time.Duration(d.s.I) / 1000 + d.Duration = low + (high - low) * time.Duration(d.s.GetInt()) / 1000 log.Println("d.Duration =", d.Duration) s := fmt.Sprintf("%s (%v)", d.Label, d.Duration) d.l.SetText(s) |
