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

View File

@ -80,7 +80,10 @@ impl EditView {
impl View for EditView { impl View for EditView {
fn draw(&self, printer: &Printer) { 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(); let width = self.content.width();
printer.with_color(ColorStyle::Secondary, |printer| { printer.with_color(ColorStyle::Secondary, |printer| {