Skip to content

Commit

Permalink
fix usam dropdown on windows and bump cli to rc6
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhanna committed Nov 13, 2024
1 parent 124b5fa commit 0549cf9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions cli/cli/Commands/Project/RunProjectCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ public static async Task RunService(
{
try
{
Log.Verbose("Killing sub process microservice.");
proc.Kill(true);
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ private void OnGUI()
isOpen = true;
var totalElementCount = usamWindow.usam.latestManifest.services.Count +
usamWindow.usam.latestManifest.storages.Count;
var pos = position;
minSize = new Vector2(usamWindow.position.width-100,
totalElementCount * elementHeight + 40);

position = pos;
var usam = usamWindow.usam;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ public static void LayoutDropDown<T>(EditorWindow rootWindow,
Func<T> windowFactory,
int yPadding = 5,
int yShift = 1,
Color backdropColor = default,
bool popupOnLeft = false
Color backdropColor = default
)
where T : EditorWindow
{
LayoutDropDown(rootWindow, current,widthOption,windowFactory,out _,yPadding,yShift, backdropColor, popupOnLeft);
LayoutDropDown(rootWindow, current,widthOption,windowFactory,out _,yPadding,yShift, backdropColor);
}
public static void LayoutDropDown<T>(EditorWindow rootWindow,
GUIContent current,
Expand All @@ -48,8 +47,7 @@ public static void LayoutDropDown<T>(EditorWindow rootWindow,
out Rect contentBounds,
int yPadding=5,
int yShift=1,
Color backdropColor=default,
bool popupOnLeft=false)
Color backdropColor=default)
where T : EditorWindow
{
if (backdropColor == default)
Expand Down Expand Up @@ -134,14 +132,9 @@ public static void LayoutDropDown<T>(EditorWindow rootWindow,
{
window = popup
};

const int tabHeight = 20;
var popupWidth = 300;
var xCoord = rootWindow.position.x + (paddedRect.xMax - popupWidth);
if (popupOnLeft)
{
xCoord = rootWindow.position.x + paddedRect.xMin;
}
var popupPosition = new Rect(xCoord, rootWindow.position.y + tabHeight + paddedRect.yMax, 0, 0);
popup.ShowAsDropDown(popupPosition, new Vector2(popupWidth, 100));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"nugetPackageVersion": "3.0.0-PREVIEW.RC5"
"nugetPackageVersion": "3.0.0-PREVIEW.RC6"
}

0 comments on commit 0549cf9

Please # to comment.