fixes
This commit is contained in:
@@ -13,9 +13,9 @@ public abstract class BaseSymbolFactory<TSymbols> : IBaseSymbolFactory<TSymbols>
|
||||
return size switch
|
||||
{
|
||||
SymbolSize.Default => Size.Empty,
|
||||
SymbolSize.Small => new Size(16, 16),
|
||||
SymbolSize.Medium => new Size(20, 20),
|
||||
SymbolSize.Large => new Size(32, 32),
|
||||
SymbolSize.Small => new Size(SymbolGlobals.DefaultImageSmallSize, SymbolGlobals.DefaultImageSmallSize),
|
||||
SymbolSize.Medium => new Size(SymbolGlobals.DefaultImageMediumSize, SymbolGlobals.DefaultImageMediumSize),
|
||||
SymbolSize.Large => new Size(SymbolGlobals.DefaultImageLargeSize, SymbolGlobals.DefaultImageLargeSize),
|
||||
_ => new Size((int)size, (int)size),
|
||||
};
|
||||
}
|
||||
|
||||
8
Pilz.UI/Symbols/SymbolGlobals.cs
Normal file
8
Pilz.UI/Symbols/SymbolGlobals.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Pilz.UI.Symbols;
|
||||
|
||||
public static class SymbolGlobals
|
||||
{
|
||||
public static int DefaultImageSmallSize { get;} = 16;
|
||||
public static int DefaultImageMediumSize { get;} = 20;
|
||||
public static int DefaultImageLargeSize { get;} = 32;
|
||||
}
|
||||
@@ -8,17 +8,14 @@ public enum SymbolSize
|
||||
Default,
|
||||
/// <summary>
|
||||
/// Resizes the symbol to 16 x 16 pixels.
|
||||
/// <br/><b>Deprecated!</b> This is just present due legacy reasons. Use <see cref="x16"/> instead.
|
||||
/// </summary>
|
||||
Small,
|
||||
/// <summary>
|
||||
/// Resizes the symbol to 20 x 20 pixels.
|
||||
/// <br/><b>Deprecated!</b> This is just present due legacy reasons. Use <see cref="x20"/> instead.
|
||||
/// </summary>
|
||||
Medium,
|
||||
/// <summary>
|
||||
/// Resizes the symbol to 32 x 32 pixels.
|
||||
/// <br/><b>Deprecated!</b> This is just present due legacy reasons. Use <see cref="x32"/> instead.
|
||||
/// </summary>
|
||||
Large,
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user