@@ -110,7 +110,7 @@ class Slider(Widget, Control):
110
110
.. code-block:: python
111
111
112
112
my_slider= Slider(20, 30)
113
- my_group = displayio.Group(max_size=10 ) # make a group that can hold 10 items
113
+ my_group = displayio.Group() # make a group
114
114
my_group.append(my_slider) # Add my_slider to the group
115
115
116
116
#
@@ -185,8 +185,7 @@ def __init__(
185
185
):
186
186
187
187
Widget .__init__ (
188
- self , x = x , y = y , height = height , width = width , ** kwargs , max_size = 4
189
- )
188
+ self , x = x , y = y , height = height , width = width , ** kwargs )
190
189
Control .__init__ (self )
191
190
192
191
self ._knob_width = height // 2
@@ -317,7 +316,8 @@ def when_selected(self, touch_point):
317
316
318
317
touch_y = touch_point [1 ] - self .y
319
318
320
- super ().selected ((touch_x , touch_y , 0 ))
319
+ self .selected ((touch_x , touch_y , 0 ))
320
+ self ._switch_handle .x = touch_x
321
321
return self ._switch_handle .x
322
322
323
323
def when_inside (self , touch_point ):
@@ -332,7 +332,7 @@ def when_inside(self, touch_point):
332
332
) # adjust touch position for the local position
333
333
touch_y = touch_point [1 ] - self .y
334
334
335
- return super () .contains ((touch_x , touch_y , 0 ))
335
+ return self .contains ((touch_x , touch_y , 0 ))
336
336
337
337
@property
338
338
def value (self ):
0 commit comments