Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows HiDPI适配 #332

Closed
Bryan2333 opened this issue Jan 30, 2023 · 1 comment
Closed

Windows HiDPI适配 #332

Bryan2333 opened this issue Jan 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Bryan2333
Copy link

描述问题

预期行为:程序界面缩放正常

实际行为:程序界面过小

如何复现

我的笔记本电脑的显示器缩放为200%,Windows下打开界面过小。我试了试在powershell中设置变量 QT_AUTO_SCREEN_SCALE_FACTOR=1 在打开后界面就正常了。

日志

nekoray_hidpi

这是没有任何设置下打开时的情况

@arm64v8a arm64v8a added the enhancement New feature or request label Jan 31, 2023
@arm64v8a
Copy link
Contributor

2.13 版本,添加了等效的 Qt::AA_EnableHighDpiScaling

nekoray/main/main.cpp

Lines 78 to 82 in c3d4507

// HiDPI workaround
if (ReadFileText("./groups/HiDPI").toInt() == 1) {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
}

但我觉得开了之后,最小尺寸会变得太大,而且不能缩小。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants