Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed May 15, 2024
1 parent bb7df84 commit 9b67a6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/tools/ecode/ecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2519,6 +2519,10 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
editor->setAutoCloseXMLTags( config.autoCloseXMLTags );
editor->setLineSpacing( config.lineSpacing );
editor->setCursorBlinkTime( config.cursorBlinkingTime );
editor->setLineWrapKeepIndentation( config.wrapKeepIndentation );
editor->setLineWrapMode( config.wrapMode );
editor->setLineWrapType( config.wrapType );

doc.setAutoCloseBrackets( !mConfig.editor.autoCloseBrackets.empty() );
doc.setAutoCloseBracketsPairs( makeAutoClosePairs( mConfig.editor.autoCloseBrackets ) );
doc.setLineEnding( docc.lineEndings );
Expand Down
1 change: 1 addition & 0 deletions src/tools/ecode/iconmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void IconManager::init( UISceneNode* sceneNode, FontTrueType* iconFont, FontTrue
{ "filetype-pkm", 0xF3C5 },
{ "settings", 0xF0E3 },
{ "stop", 0xF1A0 },
{ "text-wrap", 0xF200 },
};

for ( const auto& icon : icons )
Expand Down
5 changes: 4 additions & 1 deletion src/tools/ecode/settingsmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,8 @@ UIMenu* SettingsMenu::createViewMenu() {

mLineWrapMenu = UIPopUpMenu::New();

mViewMenu->addSubMenu( i18n( "line_wrap", "Line Wrap" ), nullptr, mLineWrapMenu )
mViewMenu
->addSubMenu( i18n( "line_wrap", "Line Wrap" ), findIcon( "text-wrap" ), mLineWrapMenu )
->on( Event::OnMenuShow, [this]( auto ) {
if ( mLineWrapMenu->getCount() == 0 ) {
UIPopUpMenu* wrapModeMenu = UIPopUpMenu::New();
Expand Down Expand Up @@ -1315,6 +1316,8 @@ UIMenu* SettingsMenu::createViewMenu() {
wrapKeepIndentation->setActive( cfg.editor.wrapKeepIndentation );
} );

mViewMenu->addSeparator();

mViewMenu->addCheckBox( i18n( "show_line_numbers", "Show Line Numbers" ) )
->setActive( mApp->getConfig().editor.showLineNumbers )
->setId( "show-line-numbers" );
Expand Down

0 comments on commit 9b67a6a

Please sign in to comment.