Skip to content

Commit 5d704c0

Browse files
committed
Minor tweaks.
1 parent 128c611 commit 5d704c0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ impl cosmic::Application for Minimon {
574574
None,
575575
);
576576
popup_settings.positioner.size_limits = Limits::NONE
577-
.max_width(372.0)
577+
.max_width(400.0)
578578
.min_width(200.0)
579579
.min_height(200.0)
580580
.max_height(720.0);

src/colorpicker.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use cosmic::iced::{
55
Alignment,
66
};
77
use cosmic::{cosmic_theme::palette::Srgb, Element};
8-
use std::ops::RangeInclusive;
98
use std::rc::Rc;
109

1110
use 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

Comments
 (0)