stuff
This commit is contained in:
@@ -12,7 +12,7 @@ pub struct TextBuilder<O = TextOutput, H: WidgetOption = ()> {
|
||||
impl<O, H: WidgetOption> TextBuilder<O, H> {
|
||||
pub fn size(mut self, size: impl UiNum) -> Self {
|
||||
self.attrs.font_size = size.to_f32();
|
||||
self.attrs.line_height = self.attrs.font_size * 1.1;
|
||||
self.attrs.line_height = self.attrs.font_size * LINE_HEIGHT_MULT;
|
||||
self
|
||||
}
|
||||
pub fn color(mut self, color: UiColor) -> Self {
|
||||
@@ -31,6 +31,10 @@ impl<O, H: WidgetOption> TextBuilder<O, H> {
|
||||
self.attrs.align = align.into();
|
||||
self
|
||||
}
|
||||
pub fn center_text(mut self) -> Self {
|
||||
self.attrs.align = Align::CENTER;
|
||||
self
|
||||
}
|
||||
pub fn wrap(mut self, wrap: bool) -> Self {
|
||||
self.attrs.wrap = wrap;
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user