kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Problems with the Display Builder toolbar actions. #507

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

Hello Kay,

first the for toolbar buttons to manipulate the widget position and size don't have all the tooltip, and I think the Distribute one is assigned to the wrong button. In the following picture in blue is the current tooltip content, in red the suggested one.

Screenshot 2019-03-15 at 14 26 14

The here are problems on how Align and Distribute works.

Align

The following self-describing OPI explain well some of the problems with Align.

CSSTUDIO-973.zip

Screenshot 2019-03-15 at 14 11 49

Is my opinion that:

This is not what happens now. I you agree on the behaviour I can fix it.

Distribute

If you select the 3 labels with a lazo-drag from bottom-right to top-left and then select "Distribute horizontally", then they are redistributed according to the order in the Outline, instead of the visual one.

kasemir commented 5 years ago

The alignment was implemented to match the behavior of EDM and BOY, i.e. the previous EPICS display tools that we had used. But what you describe is closer to what for example Power Point does, so let's do that.

Can you implement this in separate pull requests, i.e. tool tip, then alignment, then distribute?

claudio-rosati commented 5 years ago

Absolutely.

Can you give me a hint on which part of the code look at?

kasemir commented 5 years ago

Toolbar: org.csstudio.display.builder/org.csstudio.display.builder.editor/src/org/csstudio/display/builder/editor/DisplayEditor.java line 194: createToolbar()

Then see ActionDescription.ALIGN_CENTER which is mentioned in there how they're doing the alignment.