Bug 157791 - Add margins to windows (for metadata labels)
Summary: Add margins to windows (for metadata labels)
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-13 19:09 UTC by Nicolas Brisset
Modified: 2008-09-01 10:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2008-02-13 19:09:50 UTC
Version:           1.6.0_devel (using 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

As I explained in the description for bug #109430, it would be extremely useful to be able to add context information (text, metadata, etc...) around the page, in areas that would not be covered by plots when the layout is computed. It was the "reserved area" part of the above bug...

The way I suggested it could be done may have been too complex and/or penalizing in terms of performance, but rediscussing the need with a colleague we realized that it may be easier to provide a simple GUI in the window dialog for example (where the background color can be set) to indicate top/bottom/left/right margins, in which no plot would be automatically laid out. But labels and other drawing objects should be able to be placed there. That would probably be a nice and easy way to answer that long-standing and highly valid request (look at their faces when thy relayout their plots and all the labels get covered :-))
That, together with the "new" metadata handling and possibly also someday custom strings (bug #142641) would be just... great !

Barth, I have not looked at kst2 specs in a while: is this also relevant for it ?
Comment 1 Andrew Walker 2008-08-19 22:10:23 UTC
The margin settings are specified within the "Edit View" dialog. Right click
on an empty region of a window and select Edit... to launch it.

The margins are honoured for any cleanup layout request. There is no attempt to prevent the user from manually positioning view objects outside of the margin limits.

If the margin values are modified this will not be reflected in the window until the next cleanup layout action.
Comment 2 Nicolas Brisset 2008-08-28 19:00:37 UTC
Could you just outline the way it's supposed to work ? because I:
- created a window with 4 plots
- switched to layout mode to have access to the window->edit context menu (hint: couldn't it be added elsewhere, like in the view manager for instance ?)
- chose a random value for left, top, bottom or right margins and hit OK
- called up "cleanup layout"
- ... and nothing happened ! I had expected to see empty spaces between the plots and the window border, but it may be that I misunderstood something ?
Comment 3 Andrew Walker 2008-08-28 23:28:03 UTC
What you're doing sounds right.

However, the margin request will be ignored if any of the margin values are < 0,
or if top+bottom or left+right is greater than 0.5.

If this is still a problem send me the values you are using for the margins and a screenshot of kst.
Comment 4 Nicolas Brisset 2008-09-01 10:18:53 UTC
OK, it works. Maybe my values were not in the ranges ? I think some indication as to what is acceptable would be necessary. As a general usability rule, you just can't have silent errors like in that case! 
What's more, it may not be clear to the user what the "scale" is. Maybe we could add a simple text label in the dialog (or tooltips on the entry fields) with:
"Note: margin values from 0 (none) to 0.5 (half-window). 
Top + bottom and left + right may not exceed 0.5"
A warning dialog may also be used for wrong entries, but in scripting/batch mode popping up an extra dialog is not always desirable.