Skip to content

Commit

Permalink
Refresh LineNumberRulerColumn on ZoomChange of canvas
Browse files Browse the repository at this point in the history
This commit adds a listener for the ZoomChanged event to the canvas of a LineNumberRulerColumn. If the listener is notified of this event this means, that state, that differs over different zoom values, must be recalculated. Therefore the indentation are reset, when the event occurs.

Contributes to eclipse-platform/eclipse.platform.swt#62 and eclipse-platform/eclipse.platform.swt#131
  • Loading branch information
akoch-yatta committed Nov 1, 2024
1 parent 9308f4a commit 6496eea
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ public void addMouseListener(MouseListener listener) {
fCachedTextWidget= null;
});

fCanvas.addListener(SWT.ZoomChanged, e -> computeIndentations());

fMouseHandler= new MouseHandler();
fCanvas.addMouseListener(fMouseHandler);
fCanvas.addMouseMoveListener(fMouseHandler);
Expand Down

0 comments on commit 6496eea

Please sign in to comment.