mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 14:24:43 -07:00
Font size field type fix (#190)
* Font size field type fix Font size value is used as a float. Wrong type here causes exceptions. * Fix for converters
This commit is contained in:
parent
506aad27a8
commit
4d917daccb
3 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Greenshot - a free and open source screenshot tool
|
// Greenshot - a free and open source screenshot tool
|
||||||
// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
//
|
//
|
||||||
// For more information see: http://getgreenshot.org/
|
// For more information see: http://getgreenshot.org/
|
||||||
|
@ -37,7 +37,7 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields.Binding
|
||||||
|
|
||||||
protected override float Convert(decimal o)
|
protected override float Convert(decimal o)
|
||||||
{
|
{
|
||||||
return System.Convert.ToInt16(o);
|
return System.Convert.ToSingle(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecimalFloatConverter GetInstance()
|
public static DecimalFloatConverter GetInstance()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Greenshot - a free and open source screenshot tool
|
// Greenshot - a free and open source screenshot tool
|
||||||
// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
//
|
//
|
||||||
// For more information see: http://getgreenshot.org/
|
// For more information see: http://getgreenshot.org/
|
||||||
|
@ -37,7 +37,7 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields.Binding
|
||||||
|
|
||||||
protected override int Convert(decimal o)
|
protected override int Convert(decimal o)
|
||||||
{
|
{
|
||||||
return System.Convert.ToInt16(o);
|
return System.Convert.ToInt32(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecimalIntConverter GetInstance()
|
public static DecimalIntConverter GetInstance()
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This field specifies the font size
|
/// This field specifies the font size
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly IFieldType FONT_SIZE = new FieldType<int>("FONT_SIZE");
|
public static readonly IFieldType FONT_SIZE = new FieldType<float>("FONT_SIZE");
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This field specifies the horizontal text alignment
|
/// This field specifies the horizontal text alignment
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -113,4 +113,4 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
||||||
ARROWHEADS, BLUR_RADIUS, BRIGHTNESS, FILL_COLOR, FONT_BOLD, FONT_FAMILY, FONT_ITALIC, FONT_SIZE, TEXT_HORIZONTAL_ALIGNMENT, TEXT_VERTICAL_ALIGNMENT, HIGHLIGHT_COLOR, LINE_COLOR, LINE_THICKNESS, MAGNIFICATION_FACTOR, PIXEL_SIZE, SHADOW, PREPARED_FILTER_OBFUSCATE, PREPARED_FILTER_HIGHLIGHT, FLAGS
|
ARROWHEADS, BLUR_RADIUS, BRIGHTNESS, FILL_COLOR, FONT_BOLD, FONT_FAMILY, FONT_ITALIC, FONT_SIZE, TEXT_HORIZONTAL_ALIGNMENT, TEXT_VERTICAL_ALIGNMENT, HIGHLIGHT_COLOR, LINE_COLOR, LINE_THICKNESS, MAGNIFICATION_FACTOR, PIXEL_SIZE, SHADOW, PREPARED_FILTER_OBFUSCATE, PREPARED_FILTER_HIGHLIGHT, FLAGS
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue