Fix Label text_align.
This commit is contained in:
parent
6b019e3954
commit
c538a231c1
1 changed files with 9 additions and 8 deletions
|
|
@ -71,13 +71,14 @@ impl RenderOnce for Label {
|
||||||
text.to_string()
|
text.to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
div()
|
div().text_color(cx.theme().foreground).child(
|
||||||
|
self.base
|
||||||
.map(|this| match self.align {
|
.map(|this| match self.align {
|
||||||
TextAlign::Left => this.justify_start(),
|
TextAlign::Left => this.justify_start(),
|
||||||
TextAlign::Center => this.justify_center(),
|
TextAlign::Center => this.justify_center(),
|
||||||
TextAlign::Right => this.justify_end(),
|
TextAlign::Right => this.justify_end(),
|
||||||
})
|
})
|
||||||
.text_color(cx.theme().foreground)
|
.child(text_display),
|
||||||
.child(self.base.child(text_display))
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue