Remove viewport from Overlay::draw for now

This commit is contained in:
Héctor Ramón Jiménez 2021-02-23 03:12:00 +01:00
parent 81c75c1524
commit 9f60a256fc
4 changed files with 2 additions and 10 deletions

View File

@ -4,7 +4,6 @@ mod element;
pub mod menu;
pub use element::Element;
use iced_core::Rectangle;
pub use menu::Menu;
use crate::event::{self, Event};
@ -36,7 +35,6 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
viewport: &Rectangle,
) -> Renderer::Output;
/// Computes the _layout_ hash of the [`Overlay`].

View File

@ -1,5 +1,3 @@
use iced_core::Rectangle;
pub use crate::Overlay;
use crate::event::{self, Event};
@ -76,10 +74,9 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
viewport: &Rectangle,
) -> Renderer::Output {
self.overlay
.draw(renderer, defaults, layout, cursor_position, viewport)
.draw(renderer, defaults, layout, cursor_position)
}
/// Computes the _layout_ hash of the [`Element`].
@ -148,10 +145,9 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
viewport: &Rectangle,
) -> Renderer::Output {
self.content
.draw(renderer, defaults, layout, cursor_position, viewport)
.draw(renderer, defaults, layout, cursor_position)
}
fn hash_layout(&self, state: &mut Hasher, position: Point) {

View File

@ -239,7 +239,6 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
_viewport: &Rectangle,
) -> Renderer::Output {
let primitives = self.container.draw(
renderer,

View File

@ -351,7 +351,6 @@ where
&Renderer::Defaults::default(),
Layout::new(&layer.layout),
cursor_position,
&viewport,
);
self.overlay = Some(layer);