Fixed TextContainer resize, by making the ApplyBounds virtual and overriding it in the TextContainer

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1628 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-02-03 12:00:06 +00:00
parent cdf5fb52e8
commit 0398e831db
2 changed files with 10 additions and 5 deletions

View file

@ -164,16 +164,16 @@ namespace Greenshot.Drawing {
set {
Left = round(value.Left);
Top = round(value.Top);
Width = round(value.Width);
Height = round(value.Height);
Width = round(value.Width);
Height = round(value.Height);
}
}
public void ApplyBounds(RectangleF newBounds) {
public virtual void ApplyBounds(RectangleF newBounds) {
Left = round(newBounds.Left);
Top = round(newBounds.Top);
Width = round(newBounds.Width);
Height = round(newBounds.Height);
Width = round(newBounds.Width);
Height = round(newBounds.Height);
}
public DrawableContainer(Surface parent) {

View file

@ -238,6 +238,11 @@ namespace Greenshot.Drawing {
textBox.Height = this.Height;
}
public override void ApplyBounds(RectangleF newBounds) {
base.ApplyBounds(newBounds);
UpdateTextBoxPosition();
}
private void UpdateTextBoxFormat() {
UpdateFont();
Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR);