Adjust curve and keyframes UI to be easier to use with a mouse

#519
This commit is contained in:
Wojtek Figat
2021-08-24 17:15:43 +02:00
parent 0063ec3527
commit aa75a2aeb0
5 changed files with 6 additions and 6 deletions

View File

@@ -273,7 +273,7 @@ namespace FlaxEditor.GUI
/// <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.
@@ -1296,7 +1296,7 @@ namespace FlaxEditor.GUI
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

View File

@@ -75,7 +75,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
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));
}
}

View File

@@ -509,7 +509,7 @@ namespace FlaxEditor.GUI
/// <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;

View File

@@ -32,7 +32,7 @@ namespace FlaxEditor.GUI.Timeline
/// <summary>
/// The default drag insert position margin.
/// </summary>
public const float DefaultDragInsertPositionMargin = 2.0f;
public const float DefaultDragInsertPositionMargin = 4.0f;
/// <summary>
/// The header height.

View File

@@ -251,7 +251,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
Parent = Curve,
};
}
var splitterHeight = 4.0f;
var splitterHeight = 5.0f;
_splitter.Bounds = new Rectangle(0, Curve.Height - splitterHeight, Curve.Width, splitterHeight);
}
}