summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-12 05:21:46 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-12 05:21:46 +0200
commitc2cc9a835d8281c1d26c861ecac7991a924c3785 (patch)
treec070689f09abcb6ab56df501a79078dfc76e1222
parent45cfce3f6dcf2773bc8ccc7e356906cb778f2f27 (diff)
downloadiced-c2cc9a835d8281c1d26c861ecac7991a924c3785.tar.gz
iced-c2cc9a835d8281c1d26c861ecac7991a924c3785.tar.bz2
iced-c2cc9a835d8281c1d26c861ecac7991a924c3785.zip
Remove `border_width` support in `slider::Rail`
-rw-r--r--native/src/widget/slider.rs12
-rw-r--r--native/src/widget/vertical_slider.rs12
-rw-r--r--style/src/slider.rs4
-rw-r--r--style/src/theme.rs2
4 files changed, 12 insertions, 18 deletions
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs
index 2f946a8a..5b26ae01 100644
--- a/native/src/widget/slider.rs
+++ b/native/src/widget/slider.rs
@@ -8,8 +8,8 @@ use crate::renderer;
use crate::touch;
use crate::widget::tree::{self, Tree};
use crate::{
- Clipboard, Element, Layout, Length, Pixels, Point, Rectangle, Shell, Size,
- Widget,
+ Clipboard, Color, Element, Layout, Length, Pixels, Point, Rectangle, Shell,
+ Size, Widget,
};
use std::ops::RangeInclusive;
@@ -412,8 +412,8 @@ pub fn draw<T, R>(
style.rail.border_radius,
]
.into(),
- border_width: style.rail.border_width,
- border_color: style.rail.border_color,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
},
style.rail.colors.0,
);
@@ -433,8 +433,8 @@ pub fn draw<T, R>(
0.0,
]
.into(),
- border_width: style.rail.border_width,
- border_color: style.rail.border_color,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
},
style.rail.colors.1,
);
diff --git a/native/src/widget/vertical_slider.rs b/native/src/widget/vertical_slider.rs
index 8c6d1e5d..5fb6022a 100644
--- a/native/src/widget/vertical_slider.rs
+++ b/native/src/widget/vertical_slider.rs
@@ -8,8 +8,8 @@ pub use iced_style::slider::{Appearance, Handle, HandleShape, StyleSheet};
use crate::event::{self, Event};
use crate::widget::tree::{self, Tree};
use crate::{
- layout, mouse, renderer, touch, Clipboard, Element, Layout, Length, Pixels,
- Point, Rectangle, Shell, Size, Widget,
+ layout, mouse, renderer, touch, Clipboard, Color, Element, Layout, Length,
+ Pixels, Point, Rectangle, Shell, Size, Widget,
};
/// An vertical bar and a handle that selects a single value from a range of
@@ -405,8 +405,8 @@ pub fn draw<T, R>(
0.0,
]
.into(),
- border_width: style.rail.border_width,
- border_color: style.rail.border_color,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
},
style.rail.colors.1,
);
@@ -426,8 +426,8 @@ pub fn draw<T, R>(
style.rail.border_radius,
]
.into(),
- border_width: style.rail.border_width,
- border_color: style.rail.border_color,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
},
style.rail.colors.0,
);
diff --git a/style/src/slider.rs b/style/src/slider.rs
index c143915e..bb36a176 100644
--- a/style/src/slider.rs
+++ b/style/src/slider.rs
@@ -19,10 +19,6 @@ pub struct Rail {
pub size: f32,
/// The border radius of the slider.
pub border_radius: f32,
- /// The border width of the slider.
- pub border_width: f32,
- /// The border [`Color`] of the slider.
- pub border_color: Color,
}
/// The appearance of the handle of a slider.
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 417680a1..669d9157 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -423,8 +423,6 @@ impl slider::StyleSheet for Theme {
),
size: 2.0,
border_radius: 0.0,
- border_width: 0.0,
- border_color: Color::TRANSPARENT,
},
handle: slider::Handle {
color: palette.background.base.color,