summaryrefslogtreecommitdiffstats
path: root/widget/src
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src')
-rw-r--r--widget/src/slider.rs4
-rw-r--r--widget/src/vertical_slider.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/widget/src/slider.rs b/widget/src/slider.rs
index 5d0a363a..302cfae7 100644
--- a/widget/src/slider.rs
+++ b/widget/src/slider.rs
@@ -327,7 +327,7 @@ where
Event::Mouse(mouse::Event::WheelScrolled { delta })
if state.keyboard_modifiers.control() =>
{
- if let Some(_) = cursor.position_over(layout.bounds()) {
+ if cursor.is_over(layout.bounds()) {
let delta = match delta {
mouse::ScrollDelta::Lines { x: _, y } => y,
mouse::ScrollDelta::Pixels { x: _, y } => y,
@@ -343,7 +343,7 @@ where
}
}
Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => {
- if cursor.position_over(layout.bounds()).is_some() {
+ if cursor.is_over(layout.bounds()) {
match key {
Key::Named(key::Named::ArrowUp) => {
let _ = increment(current_value).map(change);
diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs
index f8f4b4a3..f02a490a 100644
--- a/widget/src/vertical_slider.rs
+++ b/widget/src/vertical_slider.rs
@@ -332,7 +332,7 @@ where
Event::Mouse(mouse::Event::WheelScrolled { delta })
if state.keyboard_modifiers.control() =>
{
- if let Some(_) = cursor.position_over(layout.bounds()) {
+ if cursor.is_over(layout.bounds()) {
let delta = match delta {
mouse::ScrollDelta::Lines { x: _, y } => y,
mouse::ScrollDelta::Pixels { x: _, y } => y,
@@ -348,7 +348,7 @@ where
}
}
Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => {
- if cursor.position_over(layout.bounds()).is_some() {
+ if cursor.is_over(layout.bounds()) {
match key {
Key::Named(key::Named::ArrowUp) => {
let _ = increment(current_value).map(change);