user interface for attach & detach

Albert Astals Cid aacid at kde.org
Tue May 3 23:48:32 BST 2022


El dissabte, 30 d’abril de 2022, a les 21:28:09 (CEST), Andreas Naumann va escriure:
> I am working on the detach and re-attach of a tab in okular.
> 
> The current implementation in MR 616
> (https://invent.kde.org/graphics/okular/-/merge_requests/616) allows to
> detach a tab into a new okular instance. If tabs are enabled, an
> existing tab can be moved to another instance.
> 
> However, if exactly one file is open, then we do not see the tab bar,
> but only one window. That raises the question, how can a user move that
> instance/file to another instance?
> 
> Until now I have the following workflows / user interfaces in mind:
> 
>    (1) Drag the window (at the title) with the single file above another
> instance: From my perspective, this feels most intuitive.
>    (2) Drag the "page" (click with the mouse somewhere next to the text)
> and move into another window: This feels also intuitive, but is in
> conflict with the page movement of a zoomed page.
>    (3) Insert some button/icon in the toolbar: How should that button
> look like and intuitively like "attach some where else".
>    (4) Use a shortcut, to show other okular instances in a dialog: That
> feels less intuitive. In particular, it is inconsistent with the
> detaching from a multi-tab.
> 
> I implemented the interface (1), but have some trouble with Qt. The
> basic idea was to overload the member function "Shell::moveEvent", check
> if the main window was moved on top of another okular window and if so,
> than open the file in the other instance and close the single-file-window.
> This approach has one big drawback: the function moveEvent is also
> called, when the new window starts. Thus, if one detaches, or creates a
> new okular instance, which (by possibility or accident) starts above
> another window, it will be closed and attached to that.
> 
> Finally I have two questions:
> 
> 1. Which interface/workflow would you prefer?

Alternative suggestion: 
 * Add a sub-option to "Always show tabs" [even if there's only one document open] in the configuration. It's what konsole and firefox do. And then people that like dragging tabs around can enable that and be happy dragging the tags.

What do you think?

Cheers,
  Albert

> 
> 2. Do you have any other suggestion for the implementation of (1)?
> 
> All best,
> Andreas
> 
> 
> 






More information about the Okular-devel mailing list