Bogdanp / Bogdanp/racket-gui-easy

Buggy sliders on macos when throttling

Open
#63 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Racket
Stars
153
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Hi, thanks for the nice lib!

I noticed that sliders on macos are buggy when throttling is involved.
It works fine on windows and linux however.

Here is a demo:

https://github.com/user-attachments/assets/678ccf69-69d8-4a3b-92f8-0e17c56772a7

```racket
#lang racket/base

(require racket/gui/easy
racket/gui/easy/operator)

(define @a (@ 0))
(define @b (@ 0))
(define @b2 (obs-throttle @b))

(render
(window
(hpanel
(text "Slider on @a")
(slider @a #:min-value 0 #:max-value 100
(λ (v) (:= @a v)))
(text (obs-map @a number->string)))

(hpanel
(text "Slider on @b")
(slider @b #:min-value 0 #:max-value 100
(λ (v) (:= @b v)))
(text (obs-map @b number->string))
(text (obs-map @b2 number->string)))

(hpanel
(text "Slider on throttled @b")
(slider @b2 #:min-value 0 #:max-value 100
(λ (v) (:= @b v)))
(text (obs-map @b number->string))
(text (obs-map @b2 number->string)))
))
```

When the slider value is the throttled observable, there is only 1 bug: the observable value is not updated during sliding.

On the other hand, when the slider value is the original observable, there is one additional bug: the value is set to where the cursor started sliding.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.