mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 01:56:31 +03:00
Improved DPI awareness on Windows.
Minor fix in Code Editor. Fixed Code Editor build with mingw32.
This commit is contained in:
@@ -778,7 +778,9 @@ void App::onFileDropped( String file ) {
|
||||
Vector2f mousePos( mUISceneNode->getEventDispatcher()->getMousePosf() );
|
||||
Node* node = mUISceneNode->overFind( mousePos );
|
||||
UICodeEditor* codeEditor = mCurEditor;
|
||||
if ( node->isType( UI_TYPE_CODEEDITOR ) ) {
|
||||
if ( !node )
|
||||
node = codeEditor;
|
||||
if ( node && node->isType( UI_TYPE_CODEEDITOR ) ) {
|
||||
codeEditor = node->asType<UICodeEditor>();
|
||||
if ( !codeEditor->getDocument().isEmpty() ) {
|
||||
auto d = createCodeEditorInTabWidget( tabWidgetFromEditor( codeEditor ) );
|
||||
@@ -793,7 +795,7 @@ void App::onTextDropped( String text ) {
|
||||
Vector2f mousePos( mUISceneNode->getEventDispatcher()->getMousePosf() );
|
||||
Node* node = mUISceneNode->overFind( mousePos );
|
||||
UICodeEditor* codeEditor = mCurEditor;
|
||||
if ( node->isType( UI_TYPE_CODEEDITOR ) )
|
||||
if ( node && node->isType( UI_TYPE_CODEEDITOR ) )
|
||||
codeEditor = node->asType<UICodeEditor>();
|
||||
if ( codeEditor && !text.empty() ) {
|
||||
if ( text[text.size() - 1] != '\n' )
|
||||
@@ -927,7 +929,7 @@ void App::init( const std::string& file, const Float& pidelDensity ) {
|
||||
|
||||
if ( mWindow->isOpen() ) {
|
||||
mWindow->setCloseRequestCallback(
|
||||
[&]( auto* win ) -> bool { return onCloseRequestCallback( win ); } );
|
||||
[&]( EE::Window::Window* win ) -> bool { return onCloseRequestCallback( win ); } );
|
||||
|
||||
mWindow->getInput()->pushCallback( [&]( InputEvent* event ) {
|
||||
if ( event->Type == InputEvent::FileDropped ) {
|
||||
|
||||
Reference in New Issue
Block a user