Remove viewport
from Overlay::draw
for now
This commit is contained in:
parent
81c75c1524
commit
9f60a256fc
@ -4,7 +4,6 @@ mod element;
|
|||||||
pub mod menu;
|
pub mod menu;
|
||||||
|
|
||||||
pub use element::Element;
|
pub use element::Element;
|
||||||
use iced_core::Rectangle;
|
|
||||||
pub use menu::Menu;
|
pub use menu::Menu;
|
||||||
|
|
||||||
use crate::event::{self, Event};
|
use crate::event::{self, Event};
|
||||||
@ -36,7 +35,6 @@ where
|
|||||||
defaults: &Renderer::Defaults,
|
defaults: &Renderer::Defaults,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
viewport: &Rectangle,
|
|
||||||
) -> Renderer::Output;
|
) -> Renderer::Output;
|
||||||
|
|
||||||
/// Computes the _layout_ hash of the [`Overlay`].
|
/// Computes the _layout_ hash of the [`Overlay`].
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use iced_core::Rectangle;
|
|
||||||
|
|
||||||
pub use crate::Overlay;
|
pub use crate::Overlay;
|
||||||
|
|
||||||
use crate::event::{self, Event};
|
use crate::event::{self, Event};
|
||||||
@ -76,10 +74,9 @@ where
|
|||||||
defaults: &Renderer::Defaults,
|
defaults: &Renderer::Defaults,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
viewport: &Rectangle,
|
|
||||||
) -> Renderer::Output {
|
) -> Renderer::Output {
|
||||||
self.overlay
|
self.overlay
|
||||||
.draw(renderer, defaults, layout, cursor_position, viewport)
|
.draw(renderer, defaults, layout, cursor_position)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the _layout_ hash of the [`Element`].
|
/// Computes the _layout_ hash of the [`Element`].
|
||||||
@ -148,10 +145,9 @@ where
|
|||||||
defaults: &Renderer::Defaults,
|
defaults: &Renderer::Defaults,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
viewport: &Rectangle,
|
|
||||||
) -> Renderer::Output {
|
) -> Renderer::Output {
|
||||||
self.content
|
self.content
|
||||||
.draw(renderer, defaults, layout, cursor_position, viewport)
|
.draw(renderer, defaults, layout, cursor_position)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_layout(&self, state: &mut Hasher, position: Point) {
|
fn hash_layout(&self, state: &mut Hasher, position: Point) {
|
||||||
|
@ -239,7 +239,6 @@ where
|
|||||||
defaults: &Renderer::Defaults,
|
defaults: &Renderer::Defaults,
|
||||||
layout: Layout<'_>,
|
layout: Layout<'_>,
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
_viewport: &Rectangle,
|
|
||||||
) -> Renderer::Output {
|
) -> Renderer::Output {
|
||||||
let primitives = self.container.draw(
|
let primitives = self.container.draw(
|
||||||
renderer,
|
renderer,
|
||||||
|
@ -351,7 +351,6 @@ where
|
|||||||
&Renderer::Defaults::default(),
|
&Renderer::Defaults::default(),
|
||||||
Layout::new(&layer.layout),
|
Layout::new(&layer.layout),
|
||||||
cursor_position,
|
cursor_position,
|
||||||
&viewport,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
self.overlay = Some(layer);
|
self.overlay = Some(layer);
|
||||||
|
Loading…
Reference in New Issue
Block a user