texworks icon indicating copy to clipboard operation
texworks copied to clipboard

Save windows layout

Open GoogleCodeExporter opened this issue 10 years ago • 19 comments

I would like to see an option to save the current window layout (size and
position of windows as well as settings concerning toolbars). It's really
frustrating to resize the PDF window every time I open a file so it doesn't
waste space on the screen
.
My suggestion would be to either automatically save the layout on closing
or have a button "window" -> "set current layout as default"

Original issue reported on code.google.com by [email protected] on 23 Jul 2009 at 5:02

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Just curious: Is there any particular layout you prefer/think is better than the
current one (which could be made available for everyone to select)?

Original comment by st.loeffler on 25 Jul 2009 at 12:06

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

I'm intending to make window positions persistent, just haven't gotten around 
to it
yet; but I'd also be interested in any suggestions for a default layout that you
think would be better.

Original comment by [email protected] on 25 Jul 2009 at 3:08

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Well I usually work with the following layout (on a 16:10 screen):
http://img217.imageshack.us/img217/9427/texworks.jpg
I like working with a single page (A4 dimensions) preview at the right side of 
the
screen without the preview toolbar which I have never used and fill the rest of 
the
screen with the editor window.
At the moment I have to hide the toolbar after each startup and resize both 
windows
horizontally so I don't have grey space around the page preview but get a bigger
editor window.
Don't know if that layout works best for everybody though. Espacially since page
layouts can be different, but maybe that can be dealt with by resizing the 
preview
window automatically to match the document aspect ratio.

Original comment by [email protected] on 28 Jul 2009 at 4:58

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Original comment by st.loeffler on 22 Aug 2009 at 3:56

  • Added labels: Type-Enhancement

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Issue 233 has been merged into this issue.

Original comment by st.loeffler on 7 Nov 2009 at 8:07

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Attached is a patch that should implement (some of) the things suggested.
What it does:
* add an item "Save Layout" to the Window menu (which is only available if both 
a tex
and corresponding pdf are shown)
* if clicked, the position/size of the tex window and that of the pdf window are
saved to the configuration file
* from that point on, the stored tex size/position replace the classical "place 
on
left" behavior, while that of the pdf window replace the classical "place on 
right"
behavior.

What it doesn't do:
* integrate well into Mac OS. There are no changes to the top level menu bars, 
since
I have no experience with that feature on the Mac
* save toolbars/docking windows. This is possible in principle (see
http://doc.trolltech.com/4.5/qmainwindow.html#saveState), but would require 
some more
extensive changes to the code
* implement more elaborate layouts (like 2x2 arrays); it acts only on one 
tex/pdf
window pair, which can be positioned and sized arbitrarily, though.
* offer a possibility to remove the saved settings easily (i.e., via the GUI). 
IMO,
this would only clutter the menu, however, since you can always resize the 
windows
the way you want and save the new layout, anyway. It may only come in handy if
someone wants to change the display resolution on a regular basis and hence 
wants
automatic adjustments back. In this case, the window layout lines could simply 
be
removed by hand from the configuration file/registry.

Original comment by st.loeffler on 7 Nov 2009 at 1:45

Attachments:

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Re: default window layout

If there are 2 or more monitors, tex window maximised on one and output window
maximised on another is a sensible choice. On monitors with 4:3 aspect ratio or 
less,
top-bottom is probably better than left-right, since only seeing one paragraph 
of
your output is more useful than only seeing the left half of the page. But 
simply
remembering window layout upon exit would solve everything.

Original comment by [email protected] on 9 Nov 2009 at 7:01

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

I don't think my patch covers multiple monitors, but I haven't tried (it uses
standard Qt code to do the job, so there may be a little hope).
Other than that, it doesn't capture the window layout on exit, you have to 
click a
menu item. But that shouldn't bar the way (I'm reluctant to automatically save 
the
window layout; sometimes one just wants to try something out or even screws 
something
up and wants to get back to a clean, working system by a restart).

Original comment by st.loeffler on 9 Nov 2009 at 7:06

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

The solution sounds fine to me. Can't wait to try it out.

Original comment by [email protected] on 9 Nov 2009 at 10:16

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Is this supposed to be included in the r.511 release thats available for 
download?
Because I can't find the menu item "Windows -> Save Layout". My OS is Windows 7 
in
case it is relevant.

Original comment by [email protected] on 12 Jan 2010 at 6:31

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Sorry to bother you again. I checked the current source files in the svn and 
this
patch doesn't seem to be included there.
Are you planning to include it or would I have to build my own version of 
texworks if
I want to use this feature?

Original comment by [email protected] on 16 Feb 2010 at 3:25

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Sorry, this isn't currently incorporated because I'd like to implement it in a 
somewhat different way than the 
initial patch. I'm planning to do a couple of things:
1) make the positions of individual windows be persistent
2) enable the user to set (and reset) the default position for newly-opened 
windows of each kind

In the meantime you can of course build a locally-patched version if you like, 
but note that the eventual 
implementation will be different.

Original comment by [email protected] on 16 Feb 2010 at 4:09

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

By 1), do you mean the position of the window for each document is persistent 
across
sessions (i.e., if you close Tw, restart it, and open the same document, the 
window
position will be the same)? Where do you intend to save the meta-data?

Original comment by st.loeffler on 16 Feb 2010 at 4:16

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Yes, I'd like each document/window to have a persistent position across 
sessions. To do this, I was thinking of 
enriching the "recent files" list to store not just filenames but also the 
state - window position, current scroll 
position, selection, etc - for each. So it will become a list of "recent file 
state records" rather than just paths.

This means that these attributes would be persistent for "recently-used" 
documents; they will not persist 
indefinitely once a document hasn't been used for a while.

Original comment by [email protected] on 16 Feb 2010 at 4:34

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

This would be helpful. I generally also have a4 docs open, and I tend to move 
the
toolbar to the RH side (If I then zoom to 32.38%, the file is readable, and I 
can
scroll it so that the upper and lower bound are at the margins of the page 
text).
Works really well, but it's a minor nuisance to have to re-set the toolbar/zoom 
every
time I close the program.
Anyway, thanks. :)

Original comment by [email protected] on 25 Feb 2010 at 9:38

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

Can we use "Save Layout" now? I've just got Version 0.4.5, but I can't find it 
under "Window".

Original comment by [email protected] on 20 Dec 2013 at 5:51

GoogleCodeExporter avatar Mar 14 '15 10:03 GoogleCodeExporter

strongly +1 for remember/restore of opened windows, sizes and positions in editor and viewer. maybe with this, one can also restore latest opened files... It's pretty annoying having to setup everything new within each new session...

hpvd avatar Aug 16 '17 14:08 hpvd