Add ui.weak(text)

This commit is contained in:
Emil Ernerfeldt
2022-02-09 15:08:01 +01:00
parent defc400c21
commit 4cede42748
2 changed files with 11 additions and 3 deletions
+7
View File
@@ -1158,6 +1158,13 @@ impl Ui {
Label::new(text.into().strong()).ui(self)
}
/// Show text that is waker (fainter color).
///
/// Shortcut for `ui.label(RichText::new(text).weak())`
pub fn weak(&mut self, text: impl Into<RichText>) -> Response {
Label::new(text.into().weak()).ui(self)
}
/// Shortcut for `add(Hyperlink::new(url))`
///
/// See also [`Hyperlink`].