How to make a very narrow window?

Asked by Arch Dude

I want to make a "stencil" document: that is, a document full of shapes that I can quickly copy into my main document.
I can do this except that the resulting "stencil" document is too wide. I can turn off all of the decoration, and this lets me narrow the document somewhat, but I can find no way to remove or shorten the menubar, and this creates an minimum size, at least in my Gnome environment. The ideal solution would be:

1) provide a way to either completely remove the menubar, or to shorten it to a single menu button that has all the existing buttons as submenus. ("Completely remote" is harder, because we wold also need a rithg-click to bring up a menu of menus.)
2) provide a way to "lock" the stencil: that is, only the zoom and selector tools may be used, and the selector only for select and copy, not for move or paste.

I have gotten completely lost trying to find where in the source code to make either change. if someone would provide a pointer, that would be nice.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

for 1) try Shift+<F11>

Revision history for this message
Arch Dude (danclemmensen) said :
#2

Thanks!
Shift+<F11> is very close to perfect. For practical purposes it also solves (2.) I am not trying to prevent myself or anyone else from deliberately modifying the stencil, but rather prevent myself from accidentally modifying it, and it's difficult to modify accidentally when there are no decorations.

The only thing missing is saving the state of "Shift+<F11>" when the file is saved. If we can do that somehow, the problem will be solved and in my opinion we will have a nearly complete solution for stencils.

I retract the third part of my problem. I found where to start in he code (inkscape.cpp and menu-skeleton.h)

Revision history for this message
Best su_v (suv-lp) said :
#3

I haven't heard of an already implemented solution for persistent toolbar visibility states.
It could well be part of RFEs or bugs like:

Bug #171579 in Inkscape: “Make inkscape remember dialogs window status”:
<https://bugs.launchpad.net/inkscape/+bug/171579>

Bug #338438 in Inkscape: “Shortcut to toggle toolbars”:
<https://bugs.launchpad.net/inkscape/+bug/338438>

Bug #426032 in Inkscape: “Toolbar Display Settings Shared Between All Windows”:
<https://bugs.launchpad.net/inkscape/+bug/426032>

Bug #170317 in Inkscape: “preview window (navigation overview)”:
<https://bugs.launchpad.net/inkscape/+bug/170317>

…and probably lots of similar reports.

One issue I see with your requested feature: so far the window size and position of a document is stored as an attribute property in the SVG file (see <sodipodi:namedview id="base" …> in the XML Editor) and a preferences setting defines whether Inkscape honors those settings and to which degree (Preferences > Windows > Save window geometry (position and size)). Based on this model (see also 'share/inkscape/templates/README') the visibility of every toolbar would need to be stored in _each_ SVG file as well - unless there exists a new model for a workspace manager (based on global inkscape preferences and not stored in the individual files).

Another solution could tend towards implementing 'stencils' or shape libraries similar to patterns, palettes, markers or filters, with its own interface - not re-using the default Inkscape canvas but adding a kind of stencil/shape browser as for example Dia or OOo have.

related blueprints/RFEs/bugs:

Ability to store reusable SVG (CSS) in a "library" : Blueprints : Inkscape:
<https://blueprints.launchpad.net/inkscape/+spec/inkscape-user-library>

A shelf layer for 'symbol' elements : Blueprints : Inkscape:
<https://blueprints.launchpad.net/inkscape/+spec/shelf-layer-for-symbols>

Bug #172091 in Inkscape: “Dockable toolbar/window for inserting stencils/clip-art”:
<https://bugs.launchpad.net/inkscape/+bug/172091>

Bug #171975 in Inkscape: “Browseable Object Library for Corrode films parts”:
<https://bugs.launchpad.net/inkscape/+bug/171975>

Bug #171107 in Inkscape: “manager gallery images (insert) (save)”:
<https://bugs.launchpad.net/inkscape/+bug/171107>

…and again probably many others that I missed in my bug tracker search.

Revision history for this message
Arch Dude (danclemmensen) said :
#4

Thanks ~suv, that solved my question.

Revision history for this message
Arch Dude (danclemmensen) said :
#5

Yes. This now becomes a policy question.

There are three conceptual approaches:

1) Make a tiny change to save the state of the focustoggle variable. This is a three-line change treata focustoggel the same way that is_maximized is currently treated, as part of saving the wingow geometry.
2) Generalize to save the state of all the variables related to window display, not just focustoggle
3) treat a stencil as a new type of persistent object rather than as an ordinary document.

As a systems architect, I favor the third option, because a stencil should have some "live" behavior that is not present in an ordinary document. In particular, the items inthe stencil might properly be alligned in rows and columns in an array that adapts to the size of the window. However, as a user, I prefer the first solution, because it gets essentially all of the needed functionality with a three-line code change.

Revision history for this message
su_v (suv-lp) said :
#6

Another topic to consider before about storing this setting on the document level: usability. Unlike the maximized state this could potentially cause usability issues since it modifies the GUI radically (i.e. all visible items are gone, only the shortcuts work) and can't be 'undone' without knowing this (undocumented?) keyboard shortcut. If a new user opens a document created by someone else (or downloaded from the web) that was saved with this setting he/she could well be lost and stop using Inkscape thinking 'it's broken'. The menu- and toolbar-less UI would at least need one button or context menu entry to return to the normal GUI.

I don't know the history of this command - nor do I remember how I discovered it. But it is rarely mentioned and not listed in the official shortcut reference <http://inkscape.org/doc/keys047.html> and only briefly in the Inkscape manual <http://tavmjong.free.fr/INKSCAPE/MANUAL/html/View-Misc.html#View-Misc-HideShow>.

Personally (I'm not a dev but do test many files attached to bug reports) I got so annoyed by the number of documents saved with 'inkscape:window-maximized="1"' that I changed the preferences setting to disrespect any saved window position/geometry, even for my personal files where it would be useful of course (I *don't* like maximized windows ;).

i.e. imho even from a users perspective one could question whether the 'three-line-code' is the best solution. For your current issue it certainly seems a compellingly simple solution promising a quick fix (if you know to code the three lines).

Revision history for this message
pbhj (pbhj) said :
#7

Incidentally as a general fix any windows minimum size can be forced in KDE using the windows Advanced > Special Window Settings (click the window's application icon which is usually top-left). Even with the toolbars I could set the size arbitrarily small; but Shift+F11 is neat.

Saving window settings on drawing close on a per drawing basis would be great IMO.