Implement Dialog::important_area

This commit is contained in:
Alexandre Bury 2018-03-22 15:24:27 -07:00
parent c9a4fbf181
commit e81307a77c

View File

@ -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()
}
}