This commit is contained in:
Alexandre Bury 2016-07-16 13:52:28 -07:00
parent a22c92a1a1
commit 5b25893496
3 changed files with 8 additions and 4 deletions

View File

@ -173,8 +173,9 @@ impl Printer {
}
/// Returns a printer on a subset of this one's area.
pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(&self, offset: S, size: T, focused: bool)
-> Printer {
pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(&self, offset: S,
size: T, focused: bool)
-> Printer {
let offset = offset.into().or_min(self.size);
Printer {
offset: self.offset + offset,

View File

@ -80,7 +80,10 @@ impl EditView {
impl View for EditView {
fn draw(&self, printer: &Printer) {
assert!(printer.size.x == self.last_length, "Was promised {}, received {}", self.last_length, printer.size.x);
assert!(printer.size.x == self.last_length,
"Was promised {}, received {}",
self.last_length,
printer.size.x);
let width = self.content.width();
printer.with_color(ColorStyle::Secondary, |printer| {

View File

@ -8,4 +8,4 @@ pub trait With: Sized {
}
}
impl <T: Sized> With for T {}
impl<T: Sized> With for T {}