summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
commit3af4c218c0e70167db23a6303d2af30aff37d2fe (patch)
tree927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs
parentb6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff)
downloadProject-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs')
-rw-r--r--Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs53
1 files changed, 0 insertions, 53 deletions
diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs
deleted file mode 100644
index 3ad43f2..0000000
--- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using UnityEngine;
-
-#if UNITY_2019_1_OR_NEWER
-using UnityEngine.UIElements;
-#else
-using UnityEngine.Experimental.UIElements;
-#endif
-
-
-namespace UnityEditor.Collaboration
-{
- internal class CollabHistoryDropDownItem : VisualElement
- {
- public CollabHistoryDropDownItem(string path, string action)
- {
- var fileName = Path.GetFileName(path);
- var isFolder = Path.GetFileNameWithoutExtension(path).Equals(fileName);
- var fileIcon = GetIconElement(action, fileName, isFolder);
- var metaContainer = new VisualElement();
- var fileNameLabel = new Label
- {
- name = "FileName",
- text = fileName
- };
- var filePathLabel = new Label
- {
- name = "FilePath",
- text = path
- };
- metaContainer.Add(fileNameLabel);
- metaContainer.Add(filePathLabel);
- Add(fileIcon);
- Add(metaContainer);
- }
-
- private Image GetIconElement(string action, string fileName, bool isFolder)
- {
- var prefix = isFolder ? "Folder" : "File";
- var actionName = action.First().ToString().ToUpper() + action.Substring(1);
- // Use the same icon for renamed and moved files
- actionName = actionName.Equals("Renamed") ? "Moved" : actionName;
- var iconElement = new Image
- {
- name = "FileIcon",
- image = EditorGUIUtility.LoadIcon("Icons/Collab." + prefix + actionName + ".png")
- };
- return iconElement;
- }
- }
-}