-
Notifications
You must be signed in to change notification settings - Fork 54
feat: screen scale support takes effect in real time #11
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
Conversation
|
更新缩放比后,窗口需要自行根据新的缩放比例更新自己的geometry,目前需要适配的项目:
使用方式:
在Deepin桌面环境中,默认对所有Qt5应用生效,可以在QCoreApplication对象创建之前设置 Qt::AA_DisableHighDpiScaling 为 true,或添加环境变量 D_DISABLE_RT_SCREEN_SCALE 关闭此功能。 |
553d803 to
6b4c7b7
Compare
Screen scale real-time effect implemented in the Adaptation Platform theme plugin linuxdeepin/qt5integration#11
| return value(SCREEN_SCALE_FACTORS).toByteArray(); | ||
| } | ||
|
|
||
| static QPair<qreal, qreal> takePair(const QVariant &value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加一点注释:例如使用的一种情况。
platformthemeplugin/qdeepintheme.cpp
Outdated
|
|
||
| static bool enabledRTScreenScale() | ||
| { | ||
| static bool env_is_set = qEnvironmentVariableIsSet("D_DISABLE_RT_SCREEN_SCALE"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果应用设置了缩放相关的环境变量,则不开启自动缩放。
Change-Id: Ib1441c474af56cf8641f15a20d1069e419539ef7
Screen scale real-time effect implemented in the Adaptation Platform theme plugin linuxdeepin/qt5integration#11
Qt应用支持实时设置屏幕缩放比且生效