pub struct RichText { /* private fields */ }Expand description
§RichText的示例用法
use xlui::*;
fn draw(ui:&mut Ui){
//此处需要导入RichTextExt,对已实现Display的类型进行转换
let text="Rich"
//设置文本颜色
.color(Color::BLUE)
//设置换行类型
.wrap(TextWrap::NoWrap)
//设置字号
.size(16.0)
//设置字体
.family("微软雅黑");
ui.label(text);
ui.label(RichText::new("Rich").color(Color::YELLOW));
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RichText
impl RefUnwindSafe for RichText
impl Send for RichText
impl Sync for RichText
impl Unpin for RichText
impl UnwindSafe for RichText
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more