1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Squiggle fix for non-default font, manually add method fix

This commit is contained in:
Brian Fiete 2019-09-30 12:23:27 -07:00
parent e43beb5794
commit 69e3bf94f7
4 changed files with 15 additions and 11 deletions

View file

@ -3487,7 +3487,7 @@ namespace IDE
public void Cmd_ZoomOut()
{
float scale = DarkTheme.sScale;
if (scale > 0.30f)
if (scale > 0.25f)
{
if (scale < 0)
scale -= 0.05f;
@ -6559,7 +6559,7 @@ namespace IDE
public void SetScale(float scale, bool force = false)
{
var prevScale = DarkTheme.sScale;
float useScale = Math.Clamp(scale, 0.25f, 4.0f);
float useScale = Math.Clamp(scale, 0.5f, 4.0f);
if ((prevScale == useScale) && (!force))
return;
@ -10069,7 +10069,7 @@ namespace IDE
UpdateRecentFileMenuItems();
ShowStartupFile();
if (mIsFirstRun)
if ((mIsFirstRun) && (!mWorkspace.IsInitialized))
ShowWelcome();
}
#endif
@ -11985,11 +11985,11 @@ namespace IDE
Image squiggleImage = IDEApp.sApp.mSquiggleImage;
int32 segSize = 30;
float height = mSquiggleImage.mHeight;
//int32 segSize = GS!(6 * 5);
float curX = x;
float curWidth = width;
float drawY = y + gApp.mCodeFont.GetHeight();
while (curWidth > 0)
{
float drawWidth = Math.Min(curWidth, segSize - (curX % segSize));
@ -11997,7 +11997,7 @@ namespace IDE
float u1 = ((int32)curX % segSize) / (float)squiggleImage.mSrcWidth;
float u2 = u1 + drawWidth / (float)squiggleImage.mSrcWidth;
g.DrawQuad(squiggleImage, curX, y + (int)GS!(15), u1, 0, drawWidth, height, u2, 1.0f);
g.DrawQuad(squiggleImage, curX, drawY, u1, 0, drawWidth, height, u2, 1.0f);
curWidth -= drawWidth;
curX += drawWidth;

View file

@ -474,7 +474,8 @@ namespace IDE
}
mChildItems.Insert(index, item);
mChildMap.Add(item.mName, item);
bool added = mChildMap.TryAdd(item.mName, item);
Debug.Assert(added);
}
public virtual void InsertChild(ProjectItem item, ProjectItem insertBefore)
@ -544,7 +545,7 @@ namespace IDE
data.Add("Type", (mIncludeKind == .Ignore) ? "IgnoreFolder" : "Folder");
base.Serialize(data);
if (mAutoInclude != (mIncludeKind == .Auto))
data.ConditionalAdd("AutoInclude", mAutoInclude, true);
data.ConditionalAdd("AutoInclude", mAutoInclude, mIncludeKind == .Auto);
}
if (!mChildItems.IsEmpty)
{
@ -593,7 +594,7 @@ namespace IDE
bool doPopulate = false;
bool autoInclude = data.GetBool("AutoInclude", true);
bool autoInclude = data.GetBool("AutoInclude", mIncludeKind == .Auto);
if ((autoInclude) && (!mAutoInclude))
doPopulate = true;
mAutoInclude = autoInclude;

View file

@ -449,6 +449,9 @@ namespace IDE.ui
continue;
}
if (!projectFolder.mAutoInclude)
continue;
let ext = scope String();
Path.GetExtension(fileName, ext);

View file

@ -642,7 +642,7 @@ namespace IDE.ui
if (underlineColor != 0)
{
using (g.PushColor(underlineColor))
IDEApp.sApp.DrawSquiggle(g, x, y, width);
gApp.DrawSquiggle(g, x, y, width);
}
}
}