mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-25 19:18:01 +02:00
Fix startup panel mem leak & resize when item is deleted
This commit is contained in:
parent
412689c64d
commit
70990053fd
1 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ namespace IDE.ui
|
||||||
mScrollContent.AddWidget(widget);
|
mScrollContent.AddWidget(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResizeSelf(float x, float y, float width, float height)
|
public override void Resize(float x, float y, float width, float height)
|
||||||
{
|
{
|
||||||
const float MARGIN = 3;
|
const float MARGIN = 3;
|
||||||
float currentY = 0;
|
float currentY = 0;
|
||||||
|
@ -48,10 +48,9 @@ namespace IDE.ui
|
||||||
if (currentY > height)
|
if (currentY > height)
|
||||||
InitScrollbars(false, true);
|
InitScrollbars(false, true);
|
||||||
|
|
||||||
Resize(x, y, width, Math.Min(currentY, height));
|
|
||||||
mScrollContent.Resize(0, 0, fillWidth, currentY);
|
mScrollContent.Resize(0, 0, fillWidth, currentY);
|
||||||
|
|
||||||
UpdateScrollbars();
|
base.Resize(x, y, width, Math.Min(currentY, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Draw(Graphics g)
|
public override void Draw(Graphics g)
|
||||||
|
@ -218,6 +217,7 @@ namespace IDE.ui
|
||||||
delete recentWorkspaces.mList[index];
|
delete recentWorkspaces.mList[index];
|
||||||
recentWorkspaces.mList.RemoveAt(index);
|
recentWorkspaces.mList.RemoveAt(index);
|
||||||
recentWorkspaces.mMenuItems[index].Dispose();
|
recentWorkspaces.mMenuItems[index].Dispose();
|
||||||
|
delete recentWorkspaces.mMenuItems[index];
|
||||||
recentWorkspaces.mMenuItems.RemoveAt(index);
|
recentWorkspaces.mMenuItems.RemoveAt(index);
|
||||||
|
|
||||||
RemoveSelf();
|
RemoveSelf();
|
||||||
|
@ -342,7 +342,7 @@ namespace IDE.ui
|
||||||
float offsetX = buttonWidth + GS!(35);
|
float offsetX = buttonWidth + GS!(35);
|
||||||
float offsetY = GS!(50);
|
float offsetY = GS!(50);
|
||||||
|
|
||||||
mRecentsScrollWidget.ResizeSelf(offsetX, offsetY, Math.Clamp(mWidth - offsetX - GS!(4), 0, GS!(700)), Math.Clamp(mHeight - offsetY - GS!(4), 0, GS!(700)));
|
mRecentsScrollWidget.Resize(offsetX, offsetY, Math.Clamp(mWidth - offsetX - GS!(4), 0, GS!(700)), Math.Clamp(mHeight - offsetY - GS!(4), 0, GS!(700)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenDocumentation()
|
void OpenDocumentation()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue