On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
One issue I haven't figured out yet:
Window size of new documents based on procedural templates
Currently (trunk and experimental), new documents based on a procedural template resize the new document window to a minimal size unless the namedview attributes for the window size are explicitly set by the script. This also happens with a custom 'default.svg' i.e. with a user default template which defines window width and height explicitly to match the template's nature and the current user's need.
AFAICT procedural templates 1) ignore the setting for default window size as defined in the preferences [ Small | Large | Maximized ] (new in 0.91) 2) override explicit window size settings in the current default template (default.svg) 3) ignore the window state property for the WM (maximized or not) 4) honor explicitly defined values for window width and height
It might be possible to query the current screen via python in the extension script and set the window size explictly (via script), relative to the screen resolution; however this would require specific functions for each supported platform (with possibly additional dependencies (PyGTK, TkInter, etc.)), and be a burden to maintain (with cross-platform support).
Any ideas how to improve the UX for procedural templates wrt initial window size, apart from hard-coding a larger window size via scripts?
Regards, V