mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Don't pass line height in GetLineSpacing
This commit is contained in:
parent
1cb21de201
commit
12a87caa65
4 changed files with 10 additions and 10 deletions
|
@ -894,11 +894,11 @@ namespace Beefy.gfx
|
|||
return (int32)theString.Length;
|
||||
}
|
||||
|
||||
public float GetLineSpacing(float heightMultiplier = 1.0f)
|
||||
public float GetLineSpacing()
|
||||
{
|
||||
if (mFTFont == null)
|
||||
return 0;
|
||||
return mFTFont.mHeight * heightMultiplier;
|
||||
return mFTFont.mHeight;
|
||||
}
|
||||
|
||||
public float GetHeight()
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace Beefy.theme.dark
|
|||
mLineCoords.GrowUninitialized(mData.mLineStarts.Count);
|
||||
mLineCoordJumpTable.Clear();
|
||||
|
||||
float fontHeight = mFont.GetLineSpacing(mLineHeight);
|
||||
float fontHeight = mFont.GetLineSpacing() * mLineHeight;
|
||||
int prevJumpIdx = -1;
|
||||
float jumpCoordSpacing = GetJumpCoordSpacing();
|
||||
|
||||
|
@ -218,7 +218,7 @@ namespace Beefy.theme.dark
|
|||
public float GetTextOffset()
|
||||
{
|
||||
float baseLineSpacing = mFont.GetLineSpacing();
|
||||
float lineSpacing = mFont.GetLineSpacing(mLineHeight);
|
||||
float lineSpacing = mFont.GetLineSpacing() * mLineHeight;
|
||||
return lineSpacing / 2.0f - baseLineSpacing / 2.0f;
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,7 @@ namespace Beefy.theme.dark
|
|||
|
||||
#unwarn
|
||||
int lineCount = GetLineCount();
|
||||
float lineSpacing = mFont.GetLineSpacing(mLineHeight);
|
||||
float lineSpacing = mFont.GetLineSpacing() * mLineHeight;
|
||||
float fontLineSpacing = mFont.GetLineSpacing();
|
||||
float textYOffset = GetTextOffset();
|
||||
|
||||
|
|
|
@ -1216,7 +1216,7 @@ namespace IDE.ui
|
|||
{
|
||||
bool isRenameSymbol = (IDEApp.sApp.mSymbolReferenceHelper != null) && (IDEApp.sApp.mSymbolReferenceHelper.mKind == SymbolReferenceHelper.Kind.Rename);
|
||||
using (g.PushColor(isRenameSymbol ? (uint32)0x28FFFFFF : (uint32)0x18FFFFFF))
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing() * mLineHeight);
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)SourceElementFlags.SymbolReference));
|
||||
return;
|
||||
|
@ -1225,7 +1225,7 @@ namespace IDE.ui
|
|||
if ((flags & (uint8)SourceElementFlags.Find_CurrentSelection) != 0)
|
||||
{
|
||||
using (g.PushColor(0x504C575C))
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing() * mLineHeight);
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)(SourceElementFlags.Find_CurrentSelection | .Find_Matches)));
|
||||
return;
|
||||
|
@ -1234,7 +1234,7 @@ namespace IDE.ui
|
|||
if ((flags & (uint8)SourceElementFlags.Find_Matches) != 0)
|
||||
{
|
||||
using (g.PushColor(0x50D0C090))
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing() * mLineHeight);
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)SourceElementFlags.Find_Matches));
|
||||
return;
|
||||
|
@ -5852,7 +5852,7 @@ namespace IDE.ui
|
|||
}
|
||||
orderedEmitEmbeds.Sort(scope (lhs, rhs) => lhs.line <=> rhs.line);
|
||||
|
||||
float fontHeight = mFont.GetLineSpacing(mLineHeight);
|
||||
float fontHeight = mFont.GetLineSpacing() * mLineHeight;
|
||||
int prevJumpIdx = -1;
|
||||
float jumpCoordSpacing = GetJumpCoordSpacing();
|
||||
|
||||
|
|
|
@ -4550,7 +4550,7 @@ namespace IDE.ui
|
|||
{
|
||||
float editX = GetEditX();
|
||||
|
||||
float lineSpacing = ewc.mFont.GetLineSpacing(ewc.mLineHeight);
|
||||
float lineSpacing = ewc.mFont.GetLineSpacing() * ewc.mLineHeight;
|
||||
int cursorLineNumber = mEditWidget.mEditWidgetContent.CursorLineAndColumn.mLine;
|
||||
bool hiliteCurrentLine = mEditWidget.mHasFocus;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue