mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Add 'mLineHeight' properrty to 'DarkEditWidget' to control line height.
This commit is contained in:
parent
8194f58f59
commit
fa96e0783c
4 changed files with 34 additions and 20 deletions
|
@ -1215,7 +1215,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());
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)SourceElementFlags.SymbolReference));
|
||||
return;
|
||||
|
@ -1224,7 +1224,7 @@ namespace IDE.ui
|
|||
if ((flags & (uint8)SourceElementFlags.Find_CurrentSelection) != 0)
|
||||
{
|
||||
using (g.PushColor(0x504C575C))
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing());
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)(SourceElementFlags.Find_CurrentSelection | .Find_Matches)));
|
||||
return;
|
||||
|
@ -1233,7 +1233,7 @@ namespace IDE.ui
|
|||
if ((flags & (uint8)SourceElementFlags.Find_Matches) != 0)
|
||||
{
|
||||
using (g.PushColor(0x50D0C090))
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing());
|
||||
g.FillRect(x, y, width, mFont.GetLineSpacing(mLineHeight));
|
||||
|
||||
DrawSectionFlagsOver(g, x, y, width, (uint8)(flags & ~(uint8)SourceElementFlags.Find_Matches));
|
||||
return;
|
||||
|
@ -1277,7 +1277,7 @@ namespace IDE.ui
|
|||
if (underlineColor != 0)
|
||||
{
|
||||
using (g.PushColor(underlineColor))
|
||||
gApp.DrawSquiggle(g, x, y, width);
|
||||
gApp.DrawSquiggle(g, x, y + GetTextOffset(), width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5851,7 +5851,7 @@ namespace IDE.ui
|
|||
}
|
||||
orderedEmitEmbeds.Sort(scope (lhs, rhs) => lhs.line <=> rhs.line);
|
||||
|
||||
float fontHeight = mFont.GetLineSpacing();
|
||||
float fontHeight = mFont.GetLineSpacing(mLineHeight);
|
||||
int prevJumpIdx = -1;
|
||||
float jumpCoordSpacing = GetJumpCoordSpacing();
|
||||
|
||||
|
@ -6430,8 +6430,10 @@ namespace IDE.ui
|
|||
let height = mFont.GetHeight() + GS!(2);
|
||||
using (g.PushColor(DarkTheme.COLOR_CHAR_PAIR_HILITE))
|
||||
{
|
||||
g.FillRect(x1, y1, charWidth, height);
|
||||
g.FillRect(x2, y2, charWidth, height);
|
||||
float offset = GetTextOffset();
|
||||
|
||||
g.FillRect(x1, y1 + offset, charWidth, height);
|
||||
g.FillRect(x2, y2 + offset, charWidth, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4550,7 +4550,7 @@ namespace IDE.ui
|
|||
{
|
||||
float editX = GetEditX();
|
||||
|
||||
float lineSpacing = ewc.mFont.GetLineSpacing();
|
||||
float lineSpacing = ewc.mFont.GetLineSpacing(ewc.mLineHeight);
|
||||
int cursorLineNumber = mEditWidget.mEditWidgetContent.CursorLineAndColumn.mLine;
|
||||
bool hiliteCurrentLine = mEditWidget.mHasFocus;
|
||||
|
||||
|
@ -4719,6 +4719,8 @@ namespace IDE.ui
|
|||
}*/
|
||||
}
|
||||
|
||||
float offset = ewc.GetTextOffset();
|
||||
|
||||
if ((gApp.mSettings.mEditorSettings.mShowLineNumbers) && (mEmbedKind == .None))
|
||||
{
|
||||
String lineStr = scope String(16);
|
||||
|
@ -4748,7 +4750,7 @@ namespace IDE.ui
|
|||
default: lineStr.AppendF("{0}", lineIdx + 1);
|
||||
}
|
||||
using (g.PushColor(DarkTheme.COLOR_TEXT))
|
||||
g.DrawString(lineStr, 0, GS!(2) + ewc.mLineCoords[lineIdx], FontAlign.Right, editX - GS!(14));
|
||||
g.DrawString(lineStr, 0, GS!(2) + ewc.mLineCoords[lineIdx] + offset, FontAlign.Right, editX - GS!(14));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4787,7 +4789,7 @@ namespace IDE.ui
|
|||
{
|
||||
using (g.PushColor(0xFFA5A5A5))
|
||||
{
|
||||
g.FillRect(editX - (int)GS!(7.5f), ewc.mLineCoords[lineIdx] - (int)GS!(0.5f), (int)GS!(1.5f), lineSpacing);
|
||||
g.FillRect(editX - (int)GS!(7.5f), ewc.mLineCoords[lineIdx] - offset - (int)GS!(0.5f), (int)GS!(1.5f), lineSpacing + offset);
|
||||
g.FillRect(editX - (int)GS!(7.5f), ewc.mLineCoords[lineIdx] + lineSpacing - (int)GS!(1.5f), GS!(5), (int)GS!(1.5f));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue