| 3974 | } |
| 3975 | |
| 3976 | void App::initImageView() { |
| 3977 | const auto hideImagePreview = [this] { |
| 3978 | mImageLayout->findByType<UIImageViewer>( UI_TYPE_IMAGE_VIEWER )->reset(); |
| 3979 | mImageLayout->setEnabled( false )->setVisible( false ); |
| 3980 | if ( mSplitter->getCurWidget() ) |
| 3981 | mSplitter->getCurWidget()->setFocus(); |
| 3982 | }; |
| 3983 | mImageLayout->find( "image_close" )->on( Event::MouseClick, [hideImagePreview]( auto ) { |
| 3984 | hideImagePreview(); |
| 3985 | } ); |
| 3986 | mImageLayout->on( Event::KeyDown, [hideImagePreview]( const Event* event ) { |
| 3987 | if ( event->asKeyEvent()->getKeyCode() == KEY_ESCAPE ) |
| 3988 | hideImagePreview(); |
| 3989 | } ); |
| 3990 | } |
| 3991 | |
| 3992 | bool App::isFileVisibleInTreeView( const std::string& filePath ) { |
| 3993 | if ( !appInstance || mDestroyingApp || !mFileSystemMatcher || |
nothing calls this directly
no test coverage detected