Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions app/i18n/input_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,44 +351,6 @@ Won&apos;t be added to the project.</source>
<numerusform></numerusform>
</translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1539"/>
<source>screen resolution: %1x%2 px
</source>
<translation type="unfinished">screen resolution: %1x%2 px
</translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1540"/>
<source>screen DPI: %1x%2
</source>
<translation type="unfinished">screen DPI: %1x%2
</translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1541"/>
<source>screen size: %1x%2 mm
</source>
<translation type="unfinished">screen size: %1x%2 mm
</translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1542"/>
<source>reported device pixel ratio: %1
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1543"/>
<source>calculated device pixel ratio: %1
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../inpututils.cpp" line="1544"/>
<source>used dp scale: %1</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../inpututils.cpp" line="2213"/>
<source>You need to add at least %n point(s) to every part.</source>
Expand Down
2 changes: 1 addition & 1 deletion app/inputhelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ QVector<QString> 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() ) );
Expand Down
30 changes: 15 additions & 15 deletions app/inpututils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>( width ) / dpiX * 25.4;
double sizeY = static_cast<double>( 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<double>( width ) / dpiX * 25.4;
const double sizeY = static_cast<double>( 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;
}
Expand Down
Loading