From e81307a77c54161257f9d65939d65cecc4a3d8aa Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 22 Mar 2018 15:24:27 -0700 Subject: [PATCH] Implement Dialog::important_area --- src/views/dialog.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/dialog.rs b/src/views/dialog.rs index 56671a1..b4d945d 100644 --- a/src/views/dialog.rs +++ b/src/views/dialog.rs @@ -4,6 +4,7 @@ use With; use align::*; use direction::Direction; use event::*; +use rect::Rect; use std::any::Any; use std::cell::Cell; use std::cmp::max; @@ -576,4 +577,9 @@ impl View for Dialog { fn focus_view(&mut self, selector: &Selector) -> Result<(), ()> { self.content.focus_view(selector) } + + fn important_area(&self, _: Vec2) -> Rect { + self.content.important_area(self.content.size) + + self.borders.top_left() + self.padding.top_left() + } }