store size in tex instead of bot_right
This commit is contained in:
@@ -16,7 +16,7 @@ pub struct TextEdit {
|
||||
impl TextEdit {
|
||||
pub fn region(&self) -> UiRegion {
|
||||
self.tex()
|
||||
.map(|t| t.size())
|
||||
.map(|t| t.size)
|
||||
.unwrap_or(Vec2::ZERO)
|
||||
.align(self.align)
|
||||
}
|
||||
@@ -49,11 +49,11 @@ impl Widget for TextEdit {
|
||||
}
|
||||
|
||||
fn desired_width(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
Len::abs(self.view.draw(ctx).size().x)
|
||||
Len::abs(self.view.draw(ctx).size.x)
|
||||
}
|
||||
|
||||
fn desired_height(&mut self, ctx: &mut SizeCtx) -> Len {
|
||||
Len::abs(self.view.draw(ctx).size().y)
|
||||
Len::abs(self.view.draw(ctx).size.y)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user