mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-18 19:48:23 -05:00
Enable HiDPI on Windows (#2469)
* Enable HiDPI on Windows * Fix build with MSVC2019 (use of overloaded operator'=' is ambiguous) Co-authored-by: Nikolay Zlatev <nik@astrapaging.com>
This commit is contained in:
@@ -83,7 +83,7 @@ void RemoteCommitsModel::refresh(const std::string& json_data, const std::string
|
||||
item->setFont(0, bold_font);
|
||||
}
|
||||
|
||||
parent_id = commit["parent"];
|
||||
parent_id = commit["parent"].get<std::string>();
|
||||
}
|
||||
|
||||
// Refresh the view
|
||||
|
||||
@@ -32,6 +32,13 @@ int main( int argc, char ** argv )
|
||||
{
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
#endif
|
||||
#endif
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
// In Windows, there is no output to terminal for a graphical application, so we install
|
||||
// the output to message box, until the main window is shown or the application exits.
|
||||
qInstallMessageHandler(boxMessageOutput);
|
||||
|
||||
Reference in New Issue
Block a user