Skip to content

Commit 5da69aa

Browse files
kjaroshtorokati44
authored andcommitted
text: Remove EditText::line_width
It's dead code.
1 parent 64a67ac commit 5da69aa

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

core/src/display_object/edit_text.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ impl<'gc> EditText<'gc> {
300300
EditTextStatic {
301301
swf: swf_movie,
302302
id: swf_tag.id(),
303-
layout: swf_tag.layout().cloned(),
304303
initial_text: swf_tag
305304
.initial_text()
306305
.map(|s| s.decode(encoding).into_owned()),
@@ -722,21 +721,6 @@ impl<'gc> EditText<'gc> {
722721
transform
723722
}
724723

725-
pub fn line_width(self) -> Twips {
726-
let edit_text = self.0.read();
727-
let static_data = &edit_text.static_data;
728-
729-
let mut base_width = Twips::from_pixels(self.width());
730-
731-
if let Some(layout) = &static_data.layout {
732-
base_width -= layout.left_margin;
733-
base_width -= layout.indent;
734-
base_width -= layout.right_margin;
735-
}
736-
737-
base_width
738-
}
739-
740724
/// Returns the variable that this text field is bound to.
741725
pub fn variable(&self) -> Option<Ref<str>> {
742726
let text = self.0.read();
@@ -2872,7 +2856,6 @@ bitflags::bitflags! {
28722856
struct EditTextStatic {
28732857
swf: Arc<SwfMovie>,
28742858
id: CharacterId,
2875-
layout: Option<swf::TextLayout>,
28762859
initial_text: Option<WString>,
28772860
}
28782861

0 commit comments

Comments
 (0)