mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 04:06:05 +13:00
Draw text gradient list visible in property grid
This commit is contained in:
parent
ddfa41391f
commit
535332393f
3 changed files with 7 additions and 8 deletions
|
@ -126,11 +126,10 @@ public int CornerRadius
|
|||
[DefaultValue(typeof(Color), "0, 20, 40"), Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color BackgroundColor2 { get; set; }
|
||||
|
||||
[Browsable(false), DefaultValue(false)]
|
||||
[DefaultValue(false)]
|
||||
public bool UseCustomGradient { get; set; }
|
||||
|
||||
// Need custom editor
|
||||
[Browsable(false)]
|
||||
// TODO: Need custom editor
|
||||
public List<GradientStop> CustomGradientList { get; set; }
|
||||
|
||||
[DefaultValue(LinearGradientMode.Vertical)]
|
||||
|
@ -139,6 +138,7 @@ public int CornerRadius
|
|||
public DrawText()
|
||||
{
|
||||
this.ApplyDefaultPropertyValues();
|
||||
CustomGradientList = new List<GradientStop>();
|
||||
}
|
||||
|
||||
public override Image Apply(Image img)
|
||||
|
|
|
@ -26,12 +26,13 @@ You should have received a copy of the GNU General Public License
|
|||
using HelpersLib;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
|
||||
namespace ImageEffectsLib
|
||||
{
|
||||
public class GradientStop
|
||||
{
|
||||
[DefaultValue(typeof(Color), "Black")]
|
||||
[DefaultValue(typeof(Color), "Black"), Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color Color { get; set; }
|
||||
|
||||
private float offset;
|
||||
|
@ -45,10 +46,7 @@ public float Offset
|
|||
}
|
||||
set
|
||||
{
|
||||
if (value >= 0 || value <= 1)
|
||||
{
|
||||
offset = value;
|
||||
}
|
||||
offset = value.Between(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
1
ImageEffectsLib/ImageEffectsForm.Designer.cs
generated
1
ImageEffectsLib/ImageEffectsForm.Designer.cs
generated
|
@ -216,6 +216,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// eiImageEffects
|
||||
//
|
||||
this.eiImageEffects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.eiImageEffects.Location = new System.Drawing.Point(8, 734);
|
||||
this.eiImageEffects.Name = "eiImageEffects";
|
||||
this.eiImageEffects.ObjectType = null;
|
||||
|
|
Loading…
Reference in a new issue