canvas window smart sizing

When you open a synfig document or just create a new one, the canvas window will
always smaller than the document size, unless your document is in a tiny size. This
cases part of artwork content is out of window, to see them you have to resize canvas
window or use zoom out / zoom fit button, these extra actions are quite annoying,
we should avoid it.

I am planing to implement smart sizing canvas window, When open a create new document,
Synfig Studio automatically detects document size and it sizes the canvas window to fix, if
the document size is larger than a particular size, the canvas view be zoomed to fix
(canvas window).

Now my question is what value should we setup for a particular size. Actually, In a UI redesign post,
I raised it as - mini size of monitor 1440x900 (?)

What is your opinion ?

thanks in advanced.

Is it necessary o have a limit? Why not always fit canvas view to size?

I think that fit the window to the canvas size (with zoom to 100% as default) is not good. Image can be bigger than current screen size and for our multi window system, that could be bad.

In my opinion what it should be implemented is:

  1. for existing documents: open the file in the same state that the user leaved it when saved: zoom and window size and position.
  2. for new documents apply a “zoom to fit” to the canvas to fit into the default size for new documents.

The default window size for new documents can be customized in preferences. And so people with huge or tiny monitors cn choose their own.

In general it is very difficult to adapt to the user screen and the user desires at the same time.


Yes, that is the reason I intended to ask a max size.

This will have to code with sif/z file. Let’s just postpone it at the first stage.

Saying we have spec that defines mini size screen is, for example, 1024x768 (It doesn’t mean that our app can not run on 800x600 well). If canvas height is larger than “1024 - widgets’ height” (including window titlebar, toolbar, h ruler, timebar, parampanel), then the canvas window height is “1024 - widgets’s height”, otherwise, canvas window has the size just displaying canvas in 100% .

Just found there is some code in canvasview.cpp which were just commented out were trying to implement this behavior , but it seems doesn’t work well.

Hi Genete,

For layout part, I can just copy your code from “Reset Windows to Original Layout” :slight_smile:
Now what I need to do is to figure out the “zoom to fit”, seems WorkArea::zoom_fit() doesn’t work.