mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 01:56:31 +03:00
Minor code editor fixes.
Improved touch dragging. Minor API change in UIMenu::add*. Updated the README.md. Added TODO.md (to keep track on the things I want to improve/implement).
This commit is contained in:
@@ -663,15 +663,18 @@ void App::initSearchBar() {
|
||||
UITextInput* findInput = mSearchBarLayout->find<UITextInput>( "search_find" );
|
||||
UITextInput* replaceInput = mSearchBarLayout->find<UITextInput>( "search_replace" );
|
||||
UICheckBox* caseSensitiveChk = mSearchBarLayout->find<UICheckBox>( "case_sensitive" );
|
||||
findInput->addEventListener(
|
||||
Event::OnTextChanged, [&, findInput, caseSensitiveChk]( const Event* ) {
|
||||
findInput->addEventListener( Event::OnTextChanged, [&, findInput,
|
||||
caseSensitiveChk]( const Event* ) {
|
||||
if ( mCurEditor ) {
|
||||
if ( !findInput->getText().empty() ) {
|
||||
mCurEditor->getDocument().setSelection( mCurEditor->getDocument().startOfDoc() );
|
||||
findNextText( findInput->getText(), caseSensitiveChk->isChecked() );
|
||||
} else if ( mCurEditor ) {
|
||||
} else {
|
||||
mCurEditor->getDocument().setSelection(
|
||||
mCurEditor->getDocument().getSelection().start() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
mSearchBarLayout->addCommand( "close-searchbar", [&] {
|
||||
mSearchBarLayout->setEnabled( false )->setVisible( false );
|
||||
mCurEditor->setFocus();
|
||||
|
||||
Reference in New Issue
Block a user