Skip to content

Commit 7632f14

Browse files
committed
Find/replace overlay: replace shell with integrated composite #2099
The FindReplaceOverlay is currently realized as a separate shell (more precisely, a JFace Dialog), which is placed at a proper position on top of the workbench shell. This has some drawback: - It has to manually adapt to movements of the parent shell or the target part/widget - It has to manually hide and show depending on visibility changes of the target part/widget - It does not follow events of the target immediately, i.e., movements are always some milliseconds behind, minimize/maximize operations/animations are not synchronous etc. - It does not locate properly when the platform uses Wayland, as manual shell positioning is not possible there This change replaces the dialog-based implementation of the FindReplaceOverlay with an in-place composite-based implementation. A composite is created in the target widget and placed relative to this composite. In consequence, the overlay automatically follows all move, resize, hide/show operations of the target widget. Fixes eclipse-platform/eclipse.platform.swt#1447 Fixes #2099
1 parent 71dc338 commit 7632f14

File tree

1 file changed

+0
-4
lines changed
  • bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay

1 file changed

+0
-4
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.eclipse.swt.widgets.ToolItem;
4444
import org.eclipse.swt.widgets.Widget;
4545

46-
import org.eclipse.core.runtime.Platform.OS;
4746
import org.eclipse.core.runtime.Status;
4847

4948
import org.eclipse.jface.bindings.keys.KeyStroke;
@@ -341,9 +340,6 @@ private void retrieveBackgroundColor() {
341340
}
342341

343342
private Color retrieveDefaultCompositeBackground() {
344-
if (OS.isLinux()) {
345-
return widgetBackgroundColor;
346-
}
347343
AtomicReference<Color> colorReference = new AtomicReference<>();
348344
Dialog dummyDialogForColorRetrieval = new Dialog(targetControl.getShell()) {
349345
@Override

0 commit comments

Comments
 (0)