I forgot why I did it the other way lol (revert)
This commit is contained in:
@@ -6,7 +6,7 @@ pub struct Regioned {
|
||||
}
|
||||
|
||||
impl<Ctx: 'static> Widget<Ctx> for Regioned {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
fn draw(&self, painter: &mut Painter<Ctx>) {
|
||||
painter.draw_within(&self.inner, self.region);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ pub struct Image {
|
||||
}
|
||||
|
||||
impl<Ctx> Widget<Ctx> for Image {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
fn draw(&self, painter: &mut Painter<Ctx>) {
|
||||
if let Some(handle) = &self.handle {
|
||||
painter.draw_texture(handle);
|
||||
} else {
|
||||
|
||||
@@ -28,7 +28,7 @@ impl Rect {
|
||||
}
|
||||
|
||||
impl<Ctx> Widget<Ctx> for Rect {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
fn draw(&self, painter: &mut Painter<Ctx>) {
|
||||
painter.write(RectPrimitive {
|
||||
color: self.color,
|
||||
radius: self.radius,
|
||||
|
||||
@@ -6,7 +6,7 @@ pub struct Span {
|
||||
}
|
||||
|
||||
impl<Ctx: 'static> Widget<Ctx> for Span {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
fn draw(&self, painter: &mut Painter<Ctx>) {
|
||||
let total = self.sums();
|
||||
let mut start = UIScalar::min();
|
||||
for (child, length) in &self.children {
|
||||
|
||||
@@ -5,7 +5,7 @@ pub struct Stack {
|
||||
}
|
||||
|
||||
impl<Ctx> Widget<Ctx> for Stack {
|
||||
fn draw(&self, mut painter: Painter<Ctx>) {
|
||||
fn draw(&self, painter: &mut Painter<Ctx>) {
|
||||
for child in &self.children {
|
||||
painter.draw(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user