mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Implement Dialog::important_area
This commit is contained in:
parent
c9a4fbf181
commit
e81307a77c
@ -4,6 +4,7 @@ use With;
|
|||||||
use align::*;
|
use align::*;
|
||||||
use direction::Direction;
|
use direction::Direction;
|
||||||
use event::*;
|
use event::*;
|
||||||
|
use rect::Rect;
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
@ -576,4 +577,9 @@ impl View for Dialog {
|
|||||||
fn focus_view(&mut self, selector: &Selector) -> Result<(), ()> {
|
fn focus_view(&mut self, selector: &Selector) -> Result<(), ()> {
|
||||||
self.content.focus_view(selector)
|
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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user