The feedback is hard-coded to be in the top-left corner of the viewer, which makes it hard to follow. When the viewer is scrolled, it's also not visible at all...
|
{ |
|
if (hintFeedback == null) { |
|
Layer layer = (Layer) LayerManager.Helper.find(mainPolicy.getHost()) |
|
.getLayer(IEditPartViewer.FEEDBACK_LAYER_ABV_1); |
|
hintFeedback = new TextFeedback(layer, true); |
|
hintFeedback.add(); |
|
} |
|
hintFeedback.setText(percent + "%"); |
|
hintFeedback.setLocation(new Point(0, 0)); |
|
} |
We should use a similar approach as used in e.g the Swing Mig- and FormLayout, where the location of the figure is at (10, y + 10) or (x + 10, 10), where (x, y) is the cursor location and depending on whether the horizontal or vertical ruler is moved. In short: The figure should be at the line we're currently moving.
|
// text feedback |
|
Layer feedbackLayer = getMainLayer(LayerConstants.FEEDBACK_LAYER); |
|
|
|
Point mouseLocation = changeBoundsRequest.getLocation().getCopy(); |
|
Point feedbackLocation = getTextFeedbackLocation(mouseLocation); |
|
// translate relative mouse location to layer => absolute mouse location |
|
feedbackLayer.translateToRelative(feedbackLocation); |
Hint: This selection policy is only used when using the "classic" FormLayout mode.
The feedback is hard-coded to be in the top-left corner of the viewer, which makes it hard to follow. When the viewer is scrolled, it's also not visible at all...
windowbuilder/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/form/FormHeaderLayoutEditPolicy.java
Lines 133 to 142 in 52f91b6
We should use a similar approach as used in e.g the Swing Mig- and FormLayout, where the location of the figure is at (10, y + 10) or (x + 10, 10), where (x, y) is the cursor location and depending on whether the horizontal or vertical ruler is moved. In short: The figure should be at the line we're currently moving.
windowbuilder/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/header/selection/AbstractDimensionSelectionEditPolicy.java
Lines 72 to 78 in 52f91b6
Hint: This selection policy is only used when using the "classic" FormLayout mode.