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

"Fit to Text Width" does not update zoom when textwidth changes #1935

Closed
ghost opened this issue Nov 12, 2021 · 1 comment
Closed

"Fit to Text Width" does not update zoom when textwidth changes #1935

ghost opened this issue Nov 12, 2021 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Nov 12, 2021

Environment

  • TeXstudio: 4.0.4 (git n/a)
  • Qt: 5.12.8, compiled with Qt 5.12.8 R
  • OS: Linux (Pop OS 20.04 LTS)
  • TeX distribution: miktex

Expected behavior

If the option "Fit to Text Width" is marked, the zoom of the viewer should always be in consonance with the text width.

Actual behavior

If text width changes, the zoom keeps the same. The only way to make it update is to close and reopen texstudio or to change the viewer mode (from embedded to windowed or viceversa).

How to reproduce

Make a new document and write only a word. Compile and view. Then add a paragraph. Compile and view. The zoom in the preview does not adapt to the new text width.
Another way to reproduce is to have two documents with different margins and change the view from one to the other.

@sunderme sunderme added bug and removed bug labels Nov 12, 2021
bryango added a commit to bryango/texstudio that referenced this issue Jul 20, 2022
@bryango
Copy link

bryango commented Jul 29, 2022

A popup like the one below will appear when the viewer is re-calculating text width:

texstudio-calculating-text-width

It steals the window focus so I couldn't keep working on the document. This is okay once in a while, but this happening after every rebuild is super annoying, especially when doing successive rebuilds (e.g. when tweaking a TikZ diagram).

I hence propose that we either:

  • redesign the popup, making it less disruptive to the workflow, or
  • simply revert this change e9cfcec, i.e. stop re-calculating text width after every rebuild.

In fact, I would say that recalculating every time is unnecessary, since for most documents the width is more or less fixed. I have hence created a fork reverting this commit. This would of course generates a regression for @krzgvtrs. If you are okay with it, I can open a pull request and ask @sunderme to merge so that it becomes the default behavior. If not then I will keep this patch on my private branch.

Personally I really really need the popup to go away because it has seriously affected my workflow. Sorry for the rambling.

bryango added a commit to bryango/texstudio that referenced this issue Mar 24, 2023
bryango added a commit to bryango/texstudio that referenced this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants