Skip to content

Commit 7cb5523

Browse files
Christopher-HermannBeckerWdf
authored andcommitted
Fix: Correct layout of sticky lines after breadcrumb
When the Breadcrumb feature is toggled on Windows, the sticky lines control layout was messed up. Fixes: #1954
1 parent 47d6592 commit 7cb5523

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ private void createControls() {
184184
GridDataFactory.fillDefaults().grab(true, false).indent(0, BOTTOM_SEPARATOR_SPACING).span(2, 1).applyTo(bottomSeparator);
185185
bottomSeparator.setEnabled(false);
186186

187+
stickyLinesCanvas.pack();
187188
stickyLinesCanvas.moveAbove(null);
188189
}
189190

@@ -268,7 +269,6 @@ private void layoutStickyLines() {
268269
layoutLineNumbers();
269270

270271
stickyLinesCanvas.setVisible(true);
271-
stickyLinesCanvas.pack();
272272
calculateAndSetStickyLinesCanvasBounds();
273273
}
274274

tests/org.eclipse.ui.editors.tests/src/org/eclipse/ui/internal/texteditor/stickyscroll/StickyScrollingControlTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static org.hamcrest.Matchers.greaterThan;
1818
import static org.junit.Assert.assertEquals;
1919
import static org.junit.Assert.assertFalse;
20-
import static org.junit.Assert.assertNotEquals;
2120

2221
import java.util.List;
2322

@@ -190,7 +189,7 @@ public void testLayoutStickyLinesCanvasOnResize() {
190189
assertEquals(0, boundsAfterResize.x);
191190
assertEquals(0, boundsAfterResize.y);
192191
assertThat(boundsAfterResize.width, greaterThan(0));
193-
assertNotEquals(boundsAfterResize.width, boundsBeforeResize.width);
192+
assertThat(boundsBeforeResize.width, greaterThan(boundsAfterResize.width));
194193
assertEquals(boundsAfterResize.height, boundsBeforeResize.height);
195194
}
196195

0 commit comments

Comments
 (0)