Move viewport argument to last position in mouse_interaction methods
This keeps the order of the arguments consistent with `draw`.
This commit is contained in:
parent
c330bb1b69
commit
631e95ee0b
24 changed files with 61 additions and 41 deletions
|
|
@ -191,8 +191,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let cursor = Cursor::from_window_position(cursor_position);
|
let cursor = Cursor::from_window_position(cursor_position);
|
||||||
|
|
|
||||||
|
|
@ -257,11 +257,11 @@ where
|
||||||
pub fn mouse_interaction(
|
pub fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.widget
|
self.widget
|
||||||
.mouse_interaction(layout, viewport, cursor_position)
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the _layout_ hash of the [`Element`].
|
/// Computes the _layout_ hash of the [`Element`].
|
||||||
|
|
@ -362,11 +362,11 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.widget
|
self.widget
|
||||||
.mouse_interaction(layout, viewport, cursor_position)
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_layout(&self, state: &mut Hasher) {
|
fn hash_layout(&self, state: &mut Hasher) {
|
||||||
|
|
@ -479,12 +479,12 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.element
|
self.element
|
||||||
.widget
|
.widget
|
||||||
.mouse_interaction(layout, viewport, cursor_position)
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_layout(&self, state: &mut Hasher) {
|
fn hash_layout(&self, state: &mut Hasher) {
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
_layout: Layout<'_>,
|
_layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
_cursor_position: Point,
|
_cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
mouse::Interaction::Idle
|
mouse::Interaction::Idle
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,11 @@ where
|
||||||
pub fn mouse_interaction(
|
pub fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.overlay
|
self.overlay
|
||||||
.mouse_interaction(layout, viewport, cursor_position)
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Draws the [`Element`] and its children using the given [`Layout`].
|
/// Draws the [`Element`] and its children using the given [`Layout`].
|
||||||
|
|
@ -150,6 +150,16 @@ where
|
||||||
event_status
|
event_status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mouse_interaction(
|
||||||
|
&self,
|
||||||
|
layout: Layout<'_>,
|
||||||
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
|
) -> mouse::Interaction {
|
||||||
|
self.content
|
||||||
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
|
}
|
||||||
|
|
||||||
fn draw(
|
fn draw(
|
||||||
&self,
|
&self,
|
||||||
renderer: &mut Renderer,
|
renderer: &mut Renderer,
|
||||||
|
|
|
||||||
|
|
@ -237,11 +237,11 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.container
|
self.container
|
||||||
.mouse_interaction(layout, viewport, cursor_position)
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn draw(
|
fn draw(
|
||||||
|
|
@ -388,8 +388,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let is_mouse_over = layout.bounds().contains(cursor_position);
|
let is_mouse_over = layout.bounds().contains(cursor_position);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -381,8 +381,8 @@ where
|
||||||
|
|
||||||
let base_interaction = self.root.widget.mouse_interaction(
|
let base_interaction = self.root.widget.mouse_interaction(
|
||||||
Layout::new(&self.base.layout),
|
Layout::new(&self.base.layout),
|
||||||
&viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
&viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
let Self {
|
let Self {
|
||||||
|
|
@ -403,8 +403,8 @@ where
|
||||||
root.overlay(Layout::new(&base.layout)).map(|overlay| {
|
root.overlay(Layout::new(&base.layout)).map(|overlay| {
|
||||||
let overlay_interaction = overlay.mouse_interaction(
|
let overlay_interaction = overlay.mouse_interaction(
|
||||||
Layout::new(&layer.layout),
|
Layout::new(&layer.layout),
|
||||||
&viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
&viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
let overlay_bounds = layer.layout.bounds();
|
let overlay_bounds = layer.layout.bounds();
|
||||||
|
|
|
||||||
|
|
@ -174,8 +174,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
_layout: Layout<'_>,
|
_layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
_cursor_position: Point,
|
_cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
mouse::Interaction::Idle
|
mouse::Interaction::Idle
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,8 +251,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let is_mouse_over = layout.bounds().contains(cursor_position);
|
let is_mouse_over = layout.bounds().contains(cursor_position);
|
||||||
let is_disabled = self.on_press.is_none();
|
let is_disabled = self.on_press.is_none();
|
||||||
|
|
|
||||||
|
|
@ -193,8 +193,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
if layout.bounds().contains(cursor_position) {
|
if layout.bounds().contains(cursor_position) {
|
||||||
mouse::Interaction::Pointer
|
mouse::Interaction::Pointer
|
||||||
|
|
|
||||||
|
|
@ -167,8 +167,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.children
|
self.children
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -176,8 +176,8 @@ where
|
||||||
.map(|(child, layout)| {
|
.map(|(child, layout)| {
|
||||||
child.widget.mouse_interaction(
|
child.widget.mouse_interaction(
|
||||||
layout,
|
layout,
|
||||||
viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.max()
|
.max()
|
||||||
|
|
|
||||||
|
|
@ -182,13 +182,13 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.content.widget.mouse_interaction(
|
self.content.widget.mouse_interaction(
|
||||||
layout.children().next().unwrap(),
|
layout.children().next().unwrap(),
|
||||||
viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -284,8 +284,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let is_mouse_over = bounds.contains(cursor_position);
|
let is_mouse_over = bounds.contains(cursor_position);
|
||||||
|
|
|
||||||
|
|
@ -474,8 +474,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
if self.state.picked_pane().is_some() {
|
if self.state.picked_pane().is_some() {
|
||||||
return mouse::Interaction::Grab;
|
return mouse::Interaction::Grab;
|
||||||
|
|
@ -492,7 +492,7 @@ where
|
||||||
.iter()
|
.iter()
|
||||||
.zip(layout.children())
|
.zip(layout.children())
|
||||||
.map(|((_pane, content), layout)| {
|
.map(|((_pane, content), layout)| {
|
||||||
content.mouse_interaction(layout, viewport, cursor_position)
|
content.mouse_interaction(layout, cursor_position, viewport)
|
||||||
})
|
})
|
||||||
.max()
|
.max()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
|
|
|
||||||
|
|
@ -201,8 +201,8 @@ where
|
||||||
pub(crate) fn mouse_interaction(
|
pub(crate) fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let (body_layout, title_bar_interaction) =
|
let (body_layout, title_bar_interaction) =
|
||||||
if let Some(title_bar) = &self.title_bar {
|
if let Some(title_bar) = &self.title_bar {
|
||||||
|
|
@ -218,8 +218,8 @@ where
|
||||||
|
|
||||||
let mouse_interaction = title_bar.mouse_interaction(
|
let mouse_interaction = title_bar.mouse_interaction(
|
||||||
title_bar_layout,
|
title_bar_layout,
|
||||||
viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
(children.next().unwrap(), mouse_interaction)
|
(children.next().unwrap(), mouse_interaction)
|
||||||
|
|
@ -228,7 +228,7 @@ where
|
||||||
};
|
};
|
||||||
|
|
||||||
self.body
|
self.body
|
||||||
.mouse_interaction(body_layout, viewport, cursor_position)
|
.mouse_interaction(body_layout, cursor_position, viewport)
|
||||||
.max(title_bar_interaction)
|
.max(title_bar_interaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,8 +256,8 @@ where
|
||||||
pub(crate) fn mouse_interaction(
|
pub(crate) fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let mut children = layout.children();
|
let mut children = layout.children();
|
||||||
let padded = children.next().unwrap();
|
let padded = children.next().unwrap();
|
||||||
|
|
@ -267,15 +267,15 @@ where
|
||||||
|
|
||||||
let title_interaction = self.content.mouse_interaction(
|
let title_interaction = self.content.mouse_interaction(
|
||||||
title_layout,
|
title_layout,
|
||||||
viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
if let Some(controls) = &self.controls {
|
if let Some(controls) = &self.controls {
|
||||||
let controls_layout = children.next().unwrap();
|
let controls_layout = children.next().unwrap();
|
||||||
|
|
||||||
controls
|
controls
|
||||||
.mouse_interaction(controls_layout, viewport, cursor_position)
|
.mouse_interaction(controls_layout, cursor_position, viewport)
|
||||||
.max(title_interaction)
|
.max(title_interaction)
|
||||||
} else {
|
} else {
|
||||||
title_interaction
|
title_interaction
|
||||||
|
|
|
||||||
|
|
@ -329,8 +329,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let is_mouse_over = bounds.contains(cursor_position);
|
let is_mouse_over = bounds.contains(cursor_position);
|
||||||
|
|
|
||||||
|
|
@ -207,8 +207,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
if layout.bounds().contains(cursor_position) {
|
if layout.bounds().contains(cursor_position) {
|
||||||
mouse::Interaction::Pointer
|
mouse::Interaction::Pointer
|
||||||
|
|
|
||||||
|
|
@ -166,8 +166,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
self.children
|
self.children
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -175,8 +175,8 @@ where
|
||||||
.map(|(child, layout)| {
|
.map(|(child, layout)| {
|
||||||
child.widget.mouse_interaction(
|
child.widget.mouse_interaction(
|
||||||
layout,
|
layout,
|
||||||
viewport,
|
|
||||||
cursor_position,
|
cursor_position,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.max()
|
.max()
|
||||||
|
|
|
||||||
|
|
@ -426,8 +426,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let content_layout = layout.children().next().unwrap();
|
let content_layout = layout.children().next().unwrap();
|
||||||
|
|
@ -453,11 +453,11 @@ where
|
||||||
|
|
||||||
self.content.mouse_interaction(
|
self.content.mouse_interaction(
|
||||||
content_layout,
|
content_layout,
|
||||||
|
cursor_position,
|
||||||
&Rectangle {
|
&Rectangle {
|
||||||
y: bounds.y + offset as f32,
|
y: bounds.y + offset as f32,
|
||||||
..bounds
|
..bounds
|
||||||
},
|
},
|
||||||
cursor_position,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -342,8 +342,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let bounds = layout.bounds();
|
let bounds = layout.bounds();
|
||||||
let is_mouse_over = bounds.contains(cursor_position);
|
let is_mouse_over = bounds.contains(cursor_position);
|
||||||
|
|
|
||||||
|
|
@ -759,8 +759,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
if layout.bounds().contains(cursor_position) {
|
if layout.bounds().contains(cursor_position) {
|
||||||
mouse::Interaction::Text
|
mouse::Interaction::Text
|
||||||
|
|
|
||||||
|
|
@ -194,8 +194,8 @@ where
|
||||||
fn mouse_interaction(
|
fn mouse_interaction(
|
||||||
&self,
|
&self,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
_viewport: &Rectangle,
|
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
|
_viewport: &Rectangle,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
if layout.bounds().contains(cursor_position) {
|
if layout.bounds().contains(cursor_position) {
|
||||||
mouse::Interaction::Pointer
|
mouse::Interaction::Pointer
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ use iced_core::Rectangle;
|
||||||
|
|
||||||
use crate::event;
|
use crate::event;
|
||||||
use crate::layout;
|
use crate::layout;
|
||||||
|
use crate::mouse;
|
||||||
use crate::renderer;
|
use crate::renderer;
|
||||||
use crate::text;
|
use crate::text;
|
||||||
use crate::widget::container;
|
use crate::widget::container;
|
||||||
|
|
@ -141,6 +142,16 @@ where
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mouse_interaction(
|
||||||
|
&self,
|
||||||
|
layout: Layout<'_>,
|
||||||
|
cursor_position: Point,
|
||||||
|
viewport: &Rectangle,
|
||||||
|
) -> mouse::Interaction {
|
||||||
|
self.content
|
||||||
|
.mouse_interaction(layout, cursor_position, viewport)
|
||||||
|
}
|
||||||
|
|
||||||
fn draw(
|
fn draw(
|
||||||
&self,
|
&self,
|
||||||
renderer: &mut Renderer,
|
renderer: &mut Renderer,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//! Display a horizontal or vertical rule for dividing content.
|
//! Display a horizontal or vertical rule for dividing content.
|
||||||
|
|
||||||
use iced_core::Color;
|
use iced_core::Color;
|
||||||
|
|
||||||
/// The fill mode of a rule.
|
/// The fill mode of a rule.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue