mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Add TextRun.preferred_width
This commit is contained in:
parent
8bce1b60ed
commit
ae27032299
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ struct TextRun {
|
||||||
|
|
||||||
impl TextRun {
|
impl TextRun {
|
||||||
fn size() -> Size2D<au> { self.size_ }
|
fn size() -> Size2D<au> { self.size_ }
|
||||||
|
fn preferred_width() -> au { self.size_.width }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn TextRun(font: Font, text: ~str) -> TextRun {
|
fn TextRun(font: Font, text: ~str) -> TextRun {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue