diff options
author | Christoph Caks | 2016-04-22 11:14:32 +0000 |
---|---|---|
committer | Christoph Caks | 2016-04-22 11:14:32 +0000 |
commit | 2d6cc38ad0c572c2894562505073ddab272bf33c (patch) | |
tree | 27f00fd1b4cc4edb4ada8b86361096d401ed19cb /bundles | |
parent | 72a5b63bcbb9759f43a2f62da7093dd21e681fbf (diff) | |
download | org.eclipse.efxclipse-2d6cc38ad0c572c2894562505073ddab272bf33c.tar.gz org.eclipse.efxclipse-2d6cc38ad0c572c2894562505073ddab272bf33c.tar.xz org.eclipse.efxclipse-2d6cc38ad0c572c2894562505073ddab272bf33c.zip |
Bug 492241 - StyledTextArea - LineRuler Width changes do not update UI
Diffstat (limited to 'bundles')
2 files changed, 3 insertions, 9 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/internal/LineRuler.java b/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/internal/LineRuler.java index fa911f30f..c0b8b52ec 100644 --- a/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/internal/LineRuler.java +++ b/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/internal/LineRuler.java @@ -48,9 +48,8 @@ public class LineRuler extends VerticalLineFlow<Integer, Annotation>{ super(converter, needsPresentation, nodeFactory, nodePopulator);
this.h = h;
- this.yOffset.addListener((x, o, n)->{
- requestLayout();
- });
+ this.yOffset.addListener((x, o, n)->requestLayout());
+ this.fixedWidth.addListener((x, o, n)->requestLayout());
}
@Override
diff --git a/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/skin/StyledTextSkin.java b/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/skin/StyledTextSkin.java index 952f62ca4..1ccf20635 100644 --- a/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/skin/StyledTextSkin.java +++ b/bundles/runtime/org.eclipse.fx.ui.controls/src/org/eclipse/fx/ui/controls/styledtext/skin/StyledTextSkin.java @@ -293,11 +293,6 @@ public class StyledTextSkin extends SkinBase<StyledTextArea> { // flow.getModel().bindContent(this.getModel()); flow.fixedWidthProperty().bind(ap.getWidth()); -// flow.prefWidthProperty().bind(ap.getWidth()); - - flow.prefWidthProperty().addListener((x, o, n) -> { - this.rootContainer.requestLayout(); - }); org.eclipse.fx.ui.controls.styledtext.model.LineRulerAnnotationPresenter.LineRuler lr = new LineRulerAnnotationPresenter.LineRuler() { @Override @@ -349,7 +344,7 @@ public class StyledTextSkin extends SkinBase<StyledTextArea> { f.visibleLinesProperty().unbind(); f.numberOfLinesProperty().unbind(); f.yOffsetProperty().unbind(); - f.prefWidthProperty().unbind(); + f.fixedWidthProperty().unbind(); }); } } |