Skip to content

Commit

Permalink
Adjust curve and keyframes UI to be easier to use with a mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
mafiesto4 committed Aug 24, 2021
1 parent 0063ec3 commit aa75a2a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Source/Editor/GUI/CurveEditor.cs
Expand Up @@ -273,7 +273,7 @@ public void UpdateTooltip()
/// <summary>
/// The keyframes size.
/// </summary>
protected static readonly Vector2 KeyframesSize = new Vector2(5.0f);
protected static readonly Vector2 KeyframesSize = new Vector2(7.0f);

/// <summary>
/// The colors for the keyframe points.
Expand Down Expand Up @@ -1296,7 +1296,7 @@ public override void UpdateKeyframes()
if (_showCollapsed)
{
point.Y = 1.0f;
p.Size = new Vector2(4.0f / viewScale.X, Height - 2.0f);
p.Size = new Vector2(KeyframesSize.X / viewScale.X, Height - 2.0f);
p.Visible = p.Component == 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion Source/Editor/GUI/Timeline/GUI/Background.cs
Expand Up @@ -75,7 +75,7 @@ public override void Draw()
var track = tracks[i];
if (track.Visible && _timeline.SelectedTracks.Contains(track) && _timeline.ContainsFocus)
{
Render2D.FillRectangle(new Rectangle(areaLeft, track.Top, areaRight, track.Height), style.BackgroundSelected);
Render2D.FillRectangle(new Rectangle(areaLeft, track.Top, areaRight, track.Height), style.BackgroundSelected.RGBMultiplied(0.4f));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Editor/GUI/Timeline/GUI/KeyframesEditor.cs
Expand Up @@ -509,7 +509,7 @@ public void UpdateTooltip()
/// <summary>
/// The keyframes size.
/// </summary>
private static readonly Vector2 KeyframesSize = new Vector2(5.0f);
private static readonly Vector2 KeyframesSize = new Vector2(7.0f);

private Contents _contents;
private Panel _mainPanel;
Expand Down
2 changes: 1 addition & 1 deletion Source/Editor/GUI/Timeline/Track.cs
Expand Up @@ -32,7 +32,7 @@ public class Track : ContainerControl
/// <summary>
/// The default drag insert position margin.
/// </summary>
public const float DefaultDragInsertPositionMargin = 2.0f;
public const float DefaultDragInsertPositionMargin = 4.0f;

/// <summary>
/// The header height.
Expand Down
2 changes: 1 addition & 1 deletion Source/Editor/GUI/Timeline/Tracks/CurvePropertyTrack.cs
Expand Up @@ -251,7 +251,7 @@ private void UpdateCurve()
Parent = Curve,
};
}
var splitterHeight = 4.0f;
var splitterHeight = 5.0f;
_splitter.Bounds = new Rectangle(0, Curve.Height - splitterHeight, Curve.Width, splitterHeight);
}
}
Expand Down

0 comments on commit aa75a2a

Please sign in to comment.