Refactor #1266 (code quality and simplicity)
This commit is contained in:
@@ -441,11 +441,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
get
|
||||
{
|
||||
// Skip when hidden
|
||||
if (!Visible)
|
||||
{
|
||||
return Rectangle.Empty;
|
||||
}
|
||||
|
||||
var view = Parent as ContentView;
|
||||
var size = Size;
|
||||
switch (view?.ViewType ?? ContentViewType.Tiles)
|
||||
@@ -453,7 +451,7 @@ namespace FlaxEditor.Content
|
||||
case ContentViewType.Tiles:
|
||||
{
|
||||
var textHeight = DefaultTextHeight * size.X / DefaultWidth;
|
||||
return new Rectangle(0, size.Y - textHeight, size.X - 2, textHeight);
|
||||
return new Rectangle(0, size.Y - textHeight, size.X, textHeight);
|
||||
}
|
||||
case ContentViewType.List:
|
||||
{
|
||||
@@ -671,8 +669,6 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override void Draw()
|
||||
{
|
||||
|
||||
// Cache data
|
||||
var size = Size;
|
||||
var style = Style.Current;
|
||||
var view = Parent as ContentView;
|
||||
|
||||
Reference in New Issue
Block a user