Pump versions.

Add keybindings to the ecode markdown viewer.
Optimization in BlockLayouter.
Hack to display code in <pre><code> HTML elements.
This commit is contained in:
Martín Lucas Golini
2026-04-26 01:12:42 -03:00
parent d8596bbdcd
commit d93b03f624
10 changed files with 88 additions and 15 deletions

View File

@@ -3236,7 +3236,7 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
auto splitter = getSplitter();
auto editor = static_cast<UICodeEditor*>( client );
auto doc = editor->getDocumentRef();
auto scrollView = UIScrollView::New();
auto scrollView = UIScrollViewCommandExecuter::New();
auto mdView = UIMarkdownView::New();
mdView->setParent( scrollView );
@@ -3274,11 +3274,14 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
mdView->loadFromString( doc->toUtf8String() );
auto title =
i18n( "markdown_live_preview_ellipsis", "Markdown Live Preview:" ) + " " +
i18n( "markdown_live_preview_colon", "Markdown Live Preview:" ) + " " +
doc->getFilename();
auto [tab, _] =
getSplitter()->createWidgetInTabWidget( tabWidget, scrollView, title );
tab->setIcon( findIcon( "filetype-md" ) );
tab->setTooltipText( title );
registerUnlockedCommands( *scrollView );
if ( removeUnusedEditor )
splitter->removeUnusedTab( tabWidget );

View File

@@ -7,13 +7,13 @@
using namespace EE;
#define ECODE_MAJOR_VERSION 0
#define ECODE_MINOR_VERSION 7
#define ECODE_PATCH_LEVEL 5
#define ECODE_MINOR_VERSION 8
#define ECODE_PATCH_LEVEL 0
/* ECODE_COMMIT_NUMBER 9999 is used for official releases, nightly builds (pre-releases) will
* contain the number of commits after the last official release
*/
#define ECODE_COMMIT_NUMBER 9999
#define ECODE_CODENAME "Vastiva"
#define ECODE_CODENAME "Kappa"
/** The compiled version of the library */
#define ECODE_VERSION( x ) \

View File

@@ -97,6 +97,17 @@ class UIVLinearLayoutCommandExecuter : public UILinearLayout, public WidgetComma
}
};
class UIScrollViewCommandExecuter : public UIScrollView, public WidgetCommandExecuter {
public:
static UIScrollViewCommandExecuter* New() { return eeNew( UIScrollViewCommandExecuter, () ); }
UIScrollViewCommandExecuter() : UIScrollView(), WidgetCommandExecuter( getInput() ) {}
virtual Uint32 onKeyDown( const KeyEvent& event ) {
return WidgetCommandExecuter::onKeyDown( event ) || UIScrollView::onKeyDown( event );
}
};
} // namespace ecode
#endif // ECODE_WIDGETCOMMANDEXECUTER_HPP