mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Tweaks to Line Height Scale
This commit is contained in:
parent
4ada557f64
commit
de7ec27032
6 changed files with 22 additions and 15 deletions
|
@ -195,6 +195,7 @@ namespace IDE.ui
|
|||
None,
|
||||
BrowseForFile,
|
||||
BrowseForFolder,
|
||||
Percent
|
||||
}
|
||||
|
||||
public enum MultiEncodeKind
|
||||
|
@ -1036,8 +1037,10 @@ namespace IDE.ui
|
|||
}
|
||||
else if (curVariantType.[Friend]mTypeCode == .Float)
|
||||
{
|
||||
if (float.Parse(newValue) case .Ok(let floatVal))
|
||||
if (float.Parse(newValue) case .Ok(var floatVal))
|
||||
{
|
||||
if (editingProp.mFlags.HasFlag(.Percent))
|
||||
floatVal /= 100;
|
||||
editingProp.mCurValue = Variant.Create(floatVal);
|
||||
}
|
||||
else
|
||||
|
@ -1600,6 +1603,8 @@ namespace IDE.ui
|
|||
{
|
||||
let valStr = scope String();
|
||||
float floatVal = propEntry.mCurValue.Get<float>();
|
||||
if (propEntry.mFlags.HasFlag(.Percent))
|
||||
floatVal *= 100;
|
||||
floatVal.ToString(valStr);
|
||||
valueItem.Label = valStr;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace IDE.ui
|
|||
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
|
||||
AddPropertiesItem(category, "Font", "mFonts");
|
||||
AddPropertiesItem(category, "Font Size", "mFontSize");
|
||||
AddPropertiesItem(category, "Line Height", "mLineHeight");
|
||||
AddPropertiesItem(category, "Line Height Scale", "mLineHeightScale", null, .Percent);
|
||||
AddPropertiesItem(category, "Autocomplete", "mAutoCompleteShowKind");
|
||||
AddPropertiesItem(category, "Autocomplete Require Control", "mAutoCompleteRequireControl");
|
||||
AddPropertiesItem(category, "Autocomplete Require Tab", "mAutoCompleteRequireTab");
|
||||
|
|
|
@ -858,7 +858,7 @@ namespace IDE.ui
|
|||
SetFont(IDEApp.sApp.mCodeFont, true, true);
|
||||
//SetFont(DarkTheme.sDarkTheme.mSmallFont, false, false);
|
||||
|
||||
mLineHeight = Math.Clamp(gApp.mSettings.mEditorSettings.mLineHeight, 0.125f, 10.0f);
|
||||
mLineHeightScale = Math.Clamp(gApp.mSettings.mEditorSettings.mLineHeightScale, 0.125f, 10.0f);
|
||||
mWantsTabsAsSpaces = gApp.mSettings.mEditorSettings.mTabsOrSpaces == .Spaces;
|
||||
mTabLength = gApp.mSettings.mEditorSettings.mTabSize;
|
||||
mTabSize = mFont.GetWidth(scope String(' ', gApp.mSettings.mEditorSettings.mTabSize));
|
||||
|
@ -1212,7 +1212,7 @@ namespace IDE.ui
|
|||
if ((flags & ~(uint8)SourceElementFlags.Skipped) == 0)
|
||||
return;
|
||||
|
||||
let lineSpacing = Math.Round(mFont.GetLineSpacing() * mLineHeight);
|
||||
let lineSpacing = LineHeight;
|
||||
if ((flags & (uint8)SourceElementFlags.SymbolReference) != 0)
|
||||
{
|
||||
bool isRenameSymbol = (IDEApp.sApp.mSymbolReferenceHelper != null) && (IDEApp.sApp.mSymbolReferenceHelper.mKind == SymbolReferenceHelper.Kind.Rename);
|
||||
|
@ -5855,7 +5855,7 @@ namespace IDE.ui
|
|||
}
|
||||
orderedEmitEmbeds.Sort(scope (lhs, rhs) => lhs.line <=> rhs.line);
|
||||
|
||||
float fontHeight = Math.Round(mFont.GetLineSpacing() * mLineHeight);
|
||||
float fontHeight = LineHeight;
|
||||
int prevJumpIdx = -1;
|
||||
float jumpCoordSpacing = GetJumpCoordSpacing();
|
||||
|
||||
|
|
|
@ -4550,7 +4550,7 @@ namespace IDE.ui
|
|||
{
|
||||
float editX = GetEditX();
|
||||
|
||||
float lineSpacing = Math.Round(ewc.mFont.GetLineSpacing() * ewc.mLineHeight);
|
||||
float lineSpacing = ewc.LineHeight;
|
||||
int cursorLineNumber = mEditWidget.mEditWidgetContent.CursorLineAndColumn.mLine;
|
||||
bool hiliteCurrentLine = mEditWidget.mHasFocus;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue