community icon indicating copy to clipboard operation
community copied to clipboard

can you add DoubleSlider widget?

Open GvozdevLeonid opened this issue 1 year ago • 3 comments

Can you add a double slider widget? I am attaching an example

doubleslider.txt

GvozdevLeonid avatar Jan 26 '24 19:01 GvozdevLeonid

[Note to others: This is a feature request for a widget that is a Slider Bar that has two values - presumably to specify a minimum and maximum value.]

Kivy is designed to be extensible, so you can add your own widgets. It appears you have extended it with a widget that is useful to you. Unless you can show that this is a widget useful to a large proportion of the users, it shouldn't be added to the Kivy base code.

Instead, consider adding it yourself to the Kivy Garden or another repository. See https://pypi.org/project/kivy-garden.radialslider/ for an example.

Julian-O avatar Jan 27 '24 18:01 Julian-O

There is no widget for selecting a range in the standard library, and using two sliders looks very crooked, and if you connect the boundaries of these two sliders with each other, then everything becomes even worse (the step becomes uneven, the sliders jump, etc.)

Actually, you can use it wherever you need to specify a range. In my personal example, limiting the visibility of the graph along the y axis

GvozdevLeonid avatar Jan 28 '24 23:01 GvozdevLeonid

@GvozdevLeonid: Yes, all of that is true.

However, my point stands. It is not the goal for Kivy to have every single widget that anyone ever needs. The goal is for Kivy to be extensible, so you can write your own widgets and share third-party widgets from Kivy Garden.

You have done some of the work to implement DoubleSlider (there still needs to be documentation, unit tests, example code and code reviews to be done). You might like to share that effort with others by making it available on Kivy Garden.

Julian-O avatar Jan 29 '24 00:01 Julian-O