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

Graphics artefacts in integrated PDF viewer #1773

Closed
latorf opened this issue Sep 27, 2021 · 10 comments
Closed

Graphics artefacts in integrated PDF viewer #1773

latorf opened this issue Sep 27, 2021 · 10 comments

Comments

@latorf
Copy link

latorf commented Sep 27, 2021

Environment

  • TeXstudio: 4.0.0
  • Qt: 6.1.3 R
  • OS: Windows 10 21H1 (64bit)
  • TeX distribution: MiKTeX "current" (all packages updated)

Expected behavior

Graphics preview in the integrated PDF viewer should work without problems, as it did with ver 3.1.2 and previous versions.

Actual behavior

When scrolling through a document/PDF preview, graphics (e.g. in figures) sometimes have strange artefacts -- in my case single white lines, mostly horizontal. When zooming in using the round magnifying glass, the problem gets worse. See attached screenshot.

texstudio-bug

How to reproduce

Create a document with graphics, e.g. \includegraphics{} with a PNG or JPG file. Scroll and/or zoom around in the produced output.

@latorf
Copy link
Author

latorf commented Sep 27, 2021

This even happens without graphics it seems. You can also notice white artifact lines in text and captions. Most of the times during/after magnifying. It does not matter whether the PDF viewer is docked or undocked. I tried forcing my NVIDIA GPU to be used with TeXstudio (instead of integrated Intel GPU/CPU), but the GPU doesn't seem to be used.
I also tried rebooting and re-compiling several times.
The only difference I can spot is indeed upgrading TeXstudio from 3.1.2 to 4.0.0...

@sunderme
Copy link
Member

Qt6 bug. Qt6 does not work properly for scaling factor like 125% (100% or 150%) is okay. Bug is reported and confirmed.
Change the scaling factor or use Txs qt5 version.

@aaron-hurst
Copy link

I am having the same issue and scaling for my PDF viewer is set to 100%. Am I missing something?

Environment:

  • TexStudio: 4.0.0
  • Qt: 6
  • OS: Windows 10 (64bit)
  • TeX distribution: MiKTeX-pdfTeX 4.1 (MiKTeX 20.12)

Observed issue:

image

PDF Viewer settings:

image

@latorf
Copy link
Author

latorf commented Sep 27, 2021

Thx for confirming the bug and the workaround (works and is ok for now). @aaron-hurst , the scaling factor @sunderme means is the global app/font scaling in Window 10. It'll affect all other programs and your desktop as well. See 2nd item here: https://support.microsoft.com/en-us/topic/make-text-and-apps-bigger-c3095a80-6edd-4779-9282-623c4d721d64 . Mine was set to 125%, which caused the problem.

@latorf
Copy link
Author

latorf commented Sep 27, 2021

Qt6 bug. Qt6 does not work properly for scaling factor like 125% (100% or 150%) is okay. Bug is reported and confirmed.
Change the scaling factor or use Txs qt5 version.

Is it this bug? https://bugreports.qt.io/browse/QTBUG-91239
Could this help? https://doc.qt.io/qt-6/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy

@sunderme
Copy link
Member

it is reported here https://bugreports.qt.io/browse/QTBUG-95957

@Baghapour
Copy link

The version with Qt5 works fine for me. It could be the Qt6 bug as said by @sunderme

@smdanjm
Copy link

smdanjm commented Jan 4, 2022

I am currently experiencing this issue. My workaround is to go to texstudio.exe right-click properties window>compatibility>"Change high DPI settings", check "Override high DPI scaling behavior." and set list item to "System". This method avoids having to change scaling systemwide. Program items are slightly bigger but glitch is no longer present.

@sunderme
Copy link
Member

sunderme commented Mar 16, 2022

qt 6.3 beta3 fixes the issue.

@sunderme sunderme unpinned this issue Mar 19, 2022
@tau-dev
Copy link

tau-dev commented Apr 3, 2022

texstudio.exe right-click properties window>compatibility>"Change high DPI settings"

If your window manager does not support that, setting QT_SCALE_FACTOR for texstudio (e.g. to 0.8 if your system scale is 125%) also fixes the problem without having to change system-wide scaling.

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

No branches or pull requests

6 participants