mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-02 22:36:00 +02:00
Merge pull request #1357 from blat-blatnik/HighlightCurrentLine
Add option to highlight current line in editor
This commit is contained in:
commit
fdd1a34d86
6 changed files with 31 additions and 5 deletions
|
@ -6097,6 +6097,7 @@ namespace IDE
|
|||
//mEditWidget.mVertScrollbar.mScrollIncrement = editWidgetContent.mFont.GetLineSpacing();
|
||||
editWidgetContent.mHiliteColor = 0xFF384858;
|
||||
editWidgetContent.mUnfocusedHiliteColor = 0x80384858;
|
||||
editWidgetContent.mHiliteCurrentLine = mSettings.mEditorSettings.mHiliteCurrentLine;
|
||||
|
||||
return editWidget;
|
||||
}
|
||||
|
|
|
@ -324,6 +324,7 @@ namespace IDE
|
|||
public Color mBuildError = 0xFFFF8080;
|
||||
public Color mBuildWarning = 0xFFFFFF80;
|
||||
public Color mVisibleWhiteSpace = 0xFF9090C0;
|
||||
public Color mCurrentLineHilite = 0xFF4C4C54;
|
||||
|
||||
public void Deserialize(StructuredData sd)
|
||||
{
|
||||
|
@ -348,6 +349,7 @@ namespace IDE
|
|||
GetColor("WorkspaceFailedText", ref mWorkspaceFailedText);
|
||||
GetColor("WorkspaceManualIncludeText", ref mWorkspaceManualIncludeText);
|
||||
GetColor("WorkspaceIgnoredText", ref mWorkspaceIgnoredText);
|
||||
GetColor("CurrentLineHilite", ref mCurrentLineHilite);
|
||||
|
||||
GetColor("Code", ref mCode);
|
||||
GetColor("Keyword", ref mKeyword);
|
||||
|
@ -411,6 +413,7 @@ namespace IDE
|
|||
DarkTheme.COLOR_SELECTED_OUTLINE = mSelectedOutline;
|
||||
DarkTheme.COLOR_MENU_FOCUSED = mMenuFocused;
|
||||
DarkTheme.COLOR_MENU_SELECTED = mMenuSelected;
|
||||
DarkTheme.COLOR_CURRENT_LINE_HILITE = mCurrentLineHilite;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -616,6 +619,7 @@ namespace IDE
|
|||
public bool mFuzzyAutoComplete = false;
|
||||
public bool mShowLocatorAnim = true;
|
||||
public bool mHiliteCursorReferences = true;
|
||||
public bool mHiliteCurrentLine = true;
|
||||
public bool mLockEditing;
|
||||
public LockWhileDebuggingKind mLockEditingWhenDebugging = .WhenNotHotSwappable;// Only applicable for
|
||||
// non-Beef sources
|
||||
|
@ -644,6 +648,7 @@ namespace IDE
|
|||
sd.Add("FuzzyAutoComplete", mFuzzyAutoComplete);
|
||||
sd.Add("ShowLocatorAnim", mShowLocatorAnim);
|
||||
sd.Add("HiliteCursorReferences", mHiliteCursorReferences);
|
||||
sd.Add("HiliteCurrentLine", mHiliteCurrentLine);
|
||||
sd.Add("LockEditing", mLockEditing);
|
||||
sd.Add("LockEditingWhenDebugging", mLockEditingWhenDebugging);
|
||||
sd.Add("PerforceAutoCheckout", mPerforceAutoCheckout);
|
||||
|
@ -675,6 +680,7 @@ namespace IDE
|
|||
sd.Get("FuzzyAutoComplete", ref mFuzzyAutoComplete);
|
||||
sd.Get("ShowLocatorAnim", ref mShowLocatorAnim);
|
||||
sd.Get("HiliteCursorReferences", ref mHiliteCursorReferences);
|
||||
sd.Get("HiliteCurrentLine", ref mHiliteCurrentLine);
|
||||
sd.Get("LockEditing", ref mLockEditing);
|
||||
sd.Get("LockEditingWhenDebugging", ref mLockEditingWhenDebugging);
|
||||
sd.Get("PerforceAutoCheckout", ref mPerforceAutoCheckout);
|
||||
|
@ -1189,6 +1195,10 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
for (let value in gApp.mFileEditData.Values)
|
||||
if (value.mEditWidget != null)
|
||||
((SourceEditWidgetContent)value.mEditWidget.Content).mHiliteCurrentLine = gApp.mSettings.mEditorSettings.mHiliteCurrentLine;
|
||||
|
||||
if (!mWakaTimeKey.IsEmpty)
|
||||
{
|
||||
if (gApp.mWakaTime == null)
|
||||
|
|
|
@ -101,6 +101,7 @@ namespace IDE.ui
|
|||
AddPropertiesItem(category, "Fuzzy Autocomplete", "mFuzzyAutoComplete");
|
||||
AddPropertiesItem(category, "Show Locator Animation", "mShowLocatorAnim");
|
||||
AddPropertiesItem(category, "Hilite Symbol at Cursor", "mHiliteCursorReferences");
|
||||
AddPropertiesItem(category, "Hilite Current Line", "mHiliteCurrentLine");
|
||||
|
||||
(?, propEntry) = AddPropertiesItem(category, "Spell Check", "mSpellCheckEnabled");
|
||||
var resetButton = new DarkButton();
|
||||
|
@ -128,7 +129,7 @@ namespace IDE.ui
|
|||
AddPropertiesItem(category, "Format on Save", "mFormatOnSave");
|
||||
AddPropertiesItem(category, "Sync with Workspace Panel", "mSyncWithWorkspacePanel");
|
||||
AddPropertiesItem(category, "Wrap Comments at Column", "mWrapCommentsAt");
|
||||
|
||||
|
||||
category.Open(true, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace IDE.util
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mDefinesSet.ContainsAlt(str))
|
||||
if (!mDefinesSet.Contains(scope .(str)))
|
||||
{
|
||||
var strCopy = new String(str);
|
||||
mDefines.Add(strCopy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue