Remove hardcoded 3px margin.
This was originally intended to correctly position text within the border, but it appears borders are weird and this doesn't jive with what unbordered text does.
This commit is contained in:
parent
7d1b3f86f5
commit
bfb150ec05
|
@ -5,7 +5,7 @@ use crate::context::{RenderContext, UpdateContext};
|
||||||
use crate::display_object::{DisplayObjectBase, TDisplayObject};
|
use crate::display_object::{DisplayObjectBase, TDisplayObject};
|
||||||
use crate::drawing::Drawing;
|
use crate::drawing::Drawing;
|
||||||
use crate::font::{round_down_to_pixel, Glyph};
|
use crate::font::{round_down_to_pixel, Glyph};
|
||||||
use crate::html::{BoxBounds, FormatSpans, LayoutBox, Position, TextFormat};
|
use crate::html::{BoxBounds, FormatSpans, LayoutBox, TextFormat};
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
use crate::shape_utils::DrawCommand;
|
use crate::shape_utils::DrawCommand;
|
||||||
use crate::tag_utils::SwfMovie;
|
use crate::tag_utils::SwfMovie;
|
||||||
|
@ -688,12 +688,6 @@ impl<'gc> TDisplayObject<'gc> for EditText<'gc> {
|
||||||
|
|
||||||
self.0.read().drawing.render(context);
|
self.0.read().drawing.render(context);
|
||||||
|
|
||||||
let text_transform = Transform::from(Position::from((
|
|
||||||
Twips::from_pixels(3.0),
|
|
||||||
Twips::from_pixels(0.0),
|
|
||||||
)));
|
|
||||||
context.transform_stack.push(&text_transform);
|
|
||||||
|
|
||||||
let mut ptr = self.0.read().layout;
|
let mut ptr = self.0.read().layout;
|
||||||
|
|
||||||
while let Some(lbox) = ptr {
|
while let Some(lbox) = ptr {
|
||||||
|
@ -703,7 +697,6 @@ impl<'gc> TDisplayObject<'gc> for EditText<'gc> {
|
||||||
}
|
}
|
||||||
|
|
||||||
context.transform_stack.pop();
|
context.transform_stack.pop();
|
||||||
context.transform_stack.pop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn allow_as_mask(&self) -> bool {
|
fn allow_as_mask(&self) -> bool {
|
||||||
|
|
Loading…
Reference in New Issue