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