mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
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:
parent
cdf5fb52e8
commit
0398e831db
2 changed files with 10 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue