mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12:00
Fix default gradient offset for add button
This commit is contained in:
parent
0a106e28cd
commit
c94e40b4a3
|
@ -38,13 +38,7 @@ public class GradientInfo
|
||||||
|
|
||||||
public List<GradientStop> Colors { get; set; }
|
public List<GradientStop> Colors { get; set; }
|
||||||
|
|
||||||
public bool IsValid
|
public bool IsValid => Colors != null && Colors.Count > 0;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Colors != null && Colors.Count > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public GradientInfo()
|
public GradientInfo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,7 +92,7 @@ private void AddGradientStop(GradientStop gradientStop)
|
||||||
private void btnAdd_Click(object sender, EventArgs e)
|
private void btnAdd_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Color color = cbtnCurrentColor.Color;
|
Color color = cbtnCurrentColor.Color;
|
||||||
float offset = (float)(nudLocation.Value / 100);
|
float offset = (float)nudLocation.Value;
|
||||||
GradientStop gradientStop = new GradientStop(color, offset);
|
GradientStop gradientStop = new GradientStop(color, offset);
|
||||||
Gradient.Colors.Add(gradientStop);
|
Gradient.Colors.Add(gradientStop);
|
||||||
AddGradientStop(gradientStop);
|
AddGradientStop(gradientStop);
|
||||||
|
|
Loading…
Reference in a new issue