@@ -5,7 +5,6 @@ use cosmic::iced::{
55 Alignment ,
66} ;
77use cosmic:: { cosmic_theme:: palette:: Srgb , Element } ;
8- use std:: ops:: RangeInclusive ;
98use std:: rc:: Rc ;
109
1110use cosmic:: {
@@ -148,7 +147,6 @@ impl ColorPicker {
148147 }
149148
150149 fn color_slider < ' b , Message > (
151- range : RangeInclusive < u8 > ,
152150 value : u8 ,
153151 on_change : impl Fn ( u8 ) -> Message + ' b ,
154152 color_stops_low : & ' static Mutex < [ ColorStop ; 2 ] > ,
@@ -157,7 +155,7 @@ impl ColorPicker {
157155 where
158156 Message : Clone + ' b ,
159157 {
160- widget:: slider ( range , value, on_change)
158+ widget:: slider ( 0 ..= 255 , value, on_change)
161159 . width ( Length :: Fixed ( 220.0 ) )
162160 . step ( 1 )
163161 . class ( Slider :: Custom {
@@ -335,7 +333,6 @@ impl ColorPicker {
335333 . height( 20 ) ,
336334 widget:: horizontal_space( ) ,
337335 ColorPicker :: color_slider(
338- 0 ..=255 ,
339336 color. red,
340337 Message :: ColorPickerSliderRedChanged ,
341338 & COLOR_STOPS_RED_LOW ,
@@ -356,7 +353,6 @@ impl ColorPicker {
356353 . height( 20 ) ,
357354 widget:: horizontal_space( ) ,
358355 ColorPicker :: color_slider(
359- 0 ..=255 ,
360356 color. green,
361357 Message :: ColorPickerSliderGreenChanged ,
362358 & COLOR_STOPS_GREEN_LOW ,
@@ -377,7 +373,6 @@ impl ColorPicker {
377373 . height( 20 ) ,
378374 widget:: horizontal_space( ) ,
379375 ColorPicker :: color_slider(
380- 0 ..=255 ,
381376 color. blue,
382377 Message :: ColorPickerSliderBlueChanged ,
383378 & COLOR_STOPS_BLUE_LOW ,
0 commit comments