mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
UICodeEditor: completed minimap support.
ecode: Added minimap support.
This commit is contained in:
@@ -643,6 +643,7 @@ UIMenu* App::createViewMenu() {
|
||||
mViewMenu->addCheckBox( "Show Line Numbers" )->setActive( mConfig.editor.showLineNumbers );
|
||||
mViewMenu->addCheckBox( "Show White Space" )->setActive( mConfig.editor.showWhiteSpaces );
|
||||
mViewMenu->addCheckBox( "Show Document Info" )->setActive( mConfig.editor.showDocInfo );
|
||||
mViewMenu->addCheckBox( "Show Minimap" )->setActive( mConfig.editor.minimap );
|
||||
mViewMenu->addCheckBox( "Highlight Matching Bracket" )
|
||||
->setActive( mConfig.editor.highlightMatchingBracket );
|
||||
mViewMenu->addCheckBox( "Highlight Current Line" )
|
||||
@@ -722,6 +723,10 @@ UIMenu* App::createViewMenu() {
|
||||
mEditorSplitter->forEachEditor( [&]( UICodeEditor* editor ) {
|
||||
editor->setEnableColorPickerOnSelection( mConfig.editor.colorPickerSelection );
|
||||
} );
|
||||
} else if ( item->getText() == "Show Minimap" ) {
|
||||
mConfig.editor.minimap = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mEditorSplitter->forEachEditor(
|
||||
[&]( UICodeEditor* editor ) { editor->showMinimap( mConfig.editor.minimap ); } );
|
||||
} else if ( item->getText() == "Enable Auto Complete" ) {
|
||||
setAutoComplete( item->asType<UIMenuCheckBox>()->isActive() );
|
||||
} else if ( item->getText() == "Enable Linter" ) {
|
||||
@@ -1524,6 +1529,8 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
|
||||
updateEditorTabTitle( editor );
|
||||
} );
|
||||
|
||||
editor->showMinimap( config.minimap );
|
||||
|
||||
if ( config.autoComplete && !mAutoCompleteModule )
|
||||
setAutoComplete( config.autoComplete );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user