Allow copy-pasting dev-server-token (#11992)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-05-17 16:41:46 -06:00 committed by GitHub
parent 84affa96ff
commit 1f611a9c90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 184 additions and 44 deletions

View file

@ -432,6 +432,19 @@ impl TextLayout {
pub fn line_height(&self) -> Pixels {
self.0.lock().as_ref().unwrap().line_height
}
/// todo!()
pub fn text(&self) -> String {
self.0
.lock()
.as_ref()
.unwrap()
.lines
.iter()
.map(|s| s.text.to_string())
.collect::<Vec<_>>()
.join("\n")
}
}
/// A text element that can be interacted with.