Skip to content

Commit 788d343

Browse files
committed
Add back Label::text method
This was removed as part of #1252, but I actually use it in runebender so would prefer to keep it around for the time being.
1 parent b2d4fbd commit 788d343

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

druid/src/widget/label.rs

+5
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ impl<T: Data> Label<T> {
330330
Label::new(text)
331331
}
332332

333+
/// Return the current value of the label's text.
334+
pub fn text(&self) -> ArcStr {
335+
self.text.display_text()
336+
}
337+
333338
/// Set the label's text.
334339
///
335340
/// # Note

0 commit comments

Comments
 (0)