diff --git a/app/i18n/input_en.ts b/app/i18n/input_en.ts index a5cde43c0..35d7b1752 100644 --- a/app/i18n/input_en.ts +++ b/app/i18n/input_en.ts @@ -351,44 +351,6 @@ Won't be added to the project. - - - screen resolution: %1x%2 px - - screen resolution: %1x%2 px - - - - - screen DPI: %1x%2 - - screen DPI: %1x%2 - - - - - screen size: %1x%2 mm - - screen size: %1x%2 mm - - - - - reported device pixel ratio: %1 - - - - - - calculated device pixel ratio: %1 - - - - - - used dp scale: %1 - - You need to add at least %n point(s) to every part. diff --git a/app/inputhelp.cpp b/app/inputhelp.cpp index 66602f7e5..2ed9a3af3 100644 --- a/app/inputhelp.cpp +++ b/app/inputhelp.cpp @@ -227,7 +227,7 @@ QVector InputHelp::logHeader( const bool isHtml ) const retLines.push_back( QStringLiteral( "Mergin User: %1" ).arg( mMerginApi->userInfo()->username() ) ); if ( !mMerginApi->userInfo()->email().isEmpty() ) { - retLines.push_back( QStringLiteral( "Mergin Data: %1/%2 Bytes" ) + retLines.push_back( QStringLiteral( "Mergin Data: %1/%2" ) .arg( InputUtils::bytesToHumanSize( mMerginApi->workspaceInfo()->diskUsage() ), InputUtils::bytesToHumanSize( mMerginApi->workspaceInfo()->storageLimit() ) ) ); retLines.push_back( QStringLiteral( "Workspace Name: %1" ).arg( mMerginApi->userInfo()->activeWorkspaceName() ) ); retLines.push_back( QStringLiteral( "Workspace ID: %1" ).arg( mMerginApi->userInfo()->activeWorkspaceId() ) ); diff --git a/app/inpututils.cpp b/app/inpututils.cpp index e534e0d6e..855e5b2c2 100644 --- a/app/inpututils.cpp +++ b/app/inpututils.cpp @@ -1528,24 +1528,24 @@ QString InputUtils::dumpScreenInfo() const const QWindowList windows = QGuiApplication::topLevelWindows(); if ( !windows.isEmpty() ) { - QScreen *screen = windows.at( 0 )->screen(); - double dpiX = screen->physicalDotsPerInchX(); - double dpiY = screen->physicalDotsPerInchY(); - int height = screen->geometry().height(); - int width = screen->geometry().width(); - double sizeX = static_cast( width ) / dpiX * 25.4; - double sizeY = static_cast( height ) / dpiY * 25.4; - - msg += tr( "screen resolution: %1x%2 px\n" ).arg( width ).arg( height ); - msg += tr( "screen DPI: %1x%2\n" ).arg( dpiX ).arg( dpiY ); - msg += tr( "screen size: %1x%2 mm\n" ).arg( QString::number( sizeX, 'f', 0 ), QString::number( sizeY, 'f', 0 ) ); - msg += tr( "reported device pixel ratio: %1\n" ).arg( screen->devicePixelRatio() ); - msg += tr( "calculated device pixel ratio: %1\n" ).arg( calculateScreenDpr() ); - msg += tr( "used dp scale: %1" ).arg( calculateDpRatio() ); + const QScreen *screen = windows.at( 0 )->screen(); + const double dpiX = screen->physicalDotsPerInchX(); + const double dpiY = screen->physicalDotsPerInchY(); + const int height = screen->geometry().height(); + const int width = screen->geometry().width(); + const double sizeX = static_cast( width ) / dpiX * 25.4; + const double sizeY = static_cast( height ) / dpiY * 25.4; + + msg += QStringLiteral( "Screen resolution: %1x%2 px\n" ).arg( width ).arg( height ); + msg += QStringLiteral( "Screen DPI: %1x%2\n" ).arg( dpiX ).arg( dpiY ); + msg += QStringLiteral( "Screen size: %1x%2 mm\n" ).arg( QString::number( sizeX, 'f', 0 ), QString::number( sizeY, 'f', 0 ) ); + msg += QStringLiteral( "Reported device pixel ratio: %1\n" ).arg( screen->devicePixelRatio() ); + msg += QStringLiteral( "Calculated device pixel ratio: %1\n" ).arg( calculateScreenDpr() ); + msg += QStringLiteral( "Used dp scale: %1" ).arg( calculateDpRatio() ); } else { - msg += QLatin1String( "screen info: application is not initialized!" ); + msg += QStringLiteral( "Application is not initialized!" ); } return msg; }