texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

the pdf-viewer shouldn't allow continuous and single page at the same time

Open octaeder opened this issue 11 months ago • 18 comments

Describe the feature and the current behavior/state

I want to change txs as follows: The pdf-viewer (embedded or windowed) has actions continuous and single page step. Currently you can activate or inactivate each of them individually. In my opinion, of the four possible combinations, it would be better not to allow the one that has both actions activated.

Explanation: From my experience activating single page step together with continous can be irritating. If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case. When continuous is active, and you activate single page step, then a noticable change only happens in case a page offset is greater 1 and the first page is visible.

Who will benefit with this feature?

This should be particularly helpful for less experienced users (and sometimes for advanced users 😀).

Any Other info

Both options should be grouped together. In the context menu of the viewer both options are placed together. But in the view menu there is continuous only. You wanted to keep continuous there because it has been there ever since and for quicker access. So I hope I can convince you that it is sensible to remove continuous from the view menu. Besides this, my current build looks like this:

Lower part of View menu:

Image

Context menu:

Image

octaeder avatar Jan 20 '25 22:01 octaeder

@sunderme are you waiting for a PR?

octaeder avatar Jan 27 '25 13:01 octaeder

well, I have no plans to change anything here.

sunderme avatar Jan 27 '25 16:01 sunderme

You have read Any Other info? So we keep the duplicate Continuous?

octaeder avatar Jan 27 '25 17:01 octaeder

is the lower part of the view menu newly changed to this behavior ?

sunderme avatar Jan 27 '25 20:01 sunderme

but the option has a purpose

It is to switch between starting at the first page:

Image

or skipping the first page:

Image

benibela avatar Jan 27 '25 20:01 benibela

Continuous was in View menu before. Then we talked about having Continuous and Single Page Step together (Grid in View in menu bar and Grid in Context menu). As I understood your answer I should do so. But I've overseen that Grid is used twice -- in View/Grid and in Grid from the Context menu of the pdf. I prepared a fix to remove Continuous from View menu (from menu bar) and keep it in the View/Grid menu. But since I expected that this would happen with my PR #3958 I didn't create a PR.

octaeder avatar Jan 27 '25 20:01 octaeder

@benibela

but the option has a purpose It is to switch between starting at the first page:

This is not necessary. Allow me to cite from above:

If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case.

octaeder avatar Jan 27 '25 20:01 octaeder

"by a simple mouse click in the left column of the grid" This is not a easy to remember operation (it only works in pan mode, not easy to find by accident, I had to look into source code)

sunderme avatar Jan 27 '25 20:01 sunderme

it is in the manual

octaeder avatar Jan 27 '25 20:01 octaeder

I'm still convinced that a less experienced user might forgett that Single Page Step is active. Ever since a switch to grid 2x1 uses a page offset of 1 (I made offset changable with #2364, but starting the viewer with 2x1 will always use offset 1, except for single page step). And it's quite difficult to figure out why the first page doesn't move to the right in this case or when you use the a click in a grid column.

octaeder avatar Jan 27 '25 20:01 octaeder

it only works in pan mode

Is this the scroll mode with the hand cursor (depending on the icon set you use)? Indeed I didn't made it available in magnifier mode. One reason was that I wanted to spare shortcuts for future operations.

octaeder avatar Jan 27 '25 21:01 octaeder

Using Single Page Offset with Continuous to set page offset to 0 in a grid of size 2x1 is not suitable. Because when you disable Continuous then Single Page Step does what's in the name. So you can't scroll fast with the wheel row by row (which keeps left pages to the left) through your document. But this behavior is one of the advantages of disabling Continuous.

octaeder avatar Jan 28 '25 01:01 octaeder

If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case.

oh, I did not notice there was a new feature. But that shows the feature is not easy to find

It would be easier to find if the offset option were in the menu, too. At least in the grid/custom dialog

Or the page offset could work with single page step enabled as well. And toggling single page step could toggle the page offset for backwards compatibility

benibela avatar Jan 28 '25 15:01 benibela

Single Page Step should use page offset 0. The first page is to the left and you can shift pages horizontaly like images on a strip of (analog 😀) film. But to do so you need to disable Continuous. And to have support of variable page offsets (with or without Continuous) you need to disable Single Page Step. That's why I think both options should be exclusive-optional.

The fact that Continuous and Single Page Step are on different levels of the View menu now prevents us from putting them in one action group. Since sunderme wants Continuous to stay where it is (in View), we would have to move Single Page Step there. I would be fine with it, even so I eplained in an earlier PR (not merged) that these options are strongly related to the grid.

octaeder avatar Jan 28 '25 15:01 octaeder

This shows a change of current upstream/master where I moved Continuous to Grid and added missing menu key accelerators:

Image

This would speed up access to specific submenu and actions.

octaeder avatar Jan 28 '25 19:01 octaeder

Key points (SPS=Single Page Step, CT=Continuous):

  • SPS and CT are actions related to the grid not to zooming
  • CT needs to be available in context menu of embedded viewer
  • avoid strange interactions of SPS and CT with exclusive-optional action group
  • same context menus for embedded and windowed viewer (simple coding, easy usage)
  • use same Grid sub menu in View menu (menubar) and the context menus (simple coding, easy usage)
  • quick access to Grid and main actions in Grid with menu key accelerators (also works in context menus)
  • context menus look cleaner with SPS and CT in Grid sub menu (especially the context menus)

There are two possible options: SPS and CT on same level as Grid menu action or both in Grid sub menu.

octaeder avatar Jan 29 '25 08:01 octaeder

"by a simple mouse click in the left column of the grid" This is not a easy to remember operation (it only works in pan mode, not easy to find by accident, I had to look into source code)

It would be easier to find if the offset option were in the menu, too. At least in the grid/custom dialog

I'll never add it to a dialog, much to slow and also not really visible. I preferre a menu entry (but it consumes another menu entry). And I want to keep the old behavior (shift+left mouse click). @benibela , @sunderme you can create an issue for that

octaeder avatar Jan 31 '25 09:01 octaeder

I'm coming back to the uncommented suggestion of moving SPS up one level. This would give room for the menu entry to be added if you create the issue mentioned before. Please note that I added a word about the old behavior to my previous comment.

Compare current View, new View and new Context:

Image

In a first step Grid and CT were interchanged, then SPS moved up and placed between them. The Context menu now looks quite similar to the View menu. Here Grid contains only grid size options.

octaeder avatar Jan 31 '25 10:01 octaeder