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

fix: svg/dci pixmap not clear when DPR > 1 #203

Closed
wants to merge 1 commit into from

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented Nov 1, 2023

QSvgIOHandler multiply final size by device pixel ratio and setDevicePixelRatio to make pixmap clear

QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QLabel label;
// /usr/share/dsg/icons/flow/3depict.dci
label.setPixmap(QPixmap("/usr/share/icons/bloom/apps/32/preferences-system.svg"));
label.show();
D_DXCB_DISABLE_OVERRIDE_HIDPI=1 QT_SCALE_FACTOR=1.25 ./test_pix
-platformpath /path/to/qt5integratoin-plugins-path

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kegechen

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Nov 1, 2023
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#203
@kegechen kegechen requested review from zccrs and 18202781743 November 1, 2023 01:17
@kegechen
Copy link
Contributor Author

kegechen commented Nov 1, 2023

image
image
image

--------分割线--------

image
image
image

QSvgIOHandler multiply final size by device pixel ratio
and setDevicePixelRatio to make pixmap clear

```cpp
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QLabel label;
// /usr/share/dsg/icons/flow/3depict.dci
label.setPixmap(QPixmap("/usr/share/icons/bloom/apps/32/preferences-system.svg"));
label.show();
```
```sh
D_DXCB_DISABLE_OVERRIDE_HIDPI=1 QT_SCALE_FACTOR=1.25 ./test_pix
-platformpath /path/to/qt5integratoin-plugins-path
```
@kegechen kegechen changed the title fix: svg pixmap not clear when DPR > 1 fix: svg/dci pixmap not clear when DPR > 1 Nov 1, 2023
deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request Nov 1, 2023
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#203
@kegechen
Copy link
Contributor Author

kegechen commented Nov 3, 2023

尝试在 QImageReader 中修复
https://codereview.qt-project.org/c/qt/qtbase/+/515545

@kegechen
Copy link
Contributor Author

尝试在 QImageReader 中修复 https://codereview.qt-project.org/c/qt/qtbase/+/515545

https://bugreports.qt.io/browse/QTBUG-119481
当前 API 不支持

@kegechen kegechen closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants