From 332d60b9234323942c71ca1966d0aebbf18fe6bb Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Thu, 4 Jul 2024 13:00:10 +0200 Subject: [PATCH] Improve styling of expand/collapse button in find/replace overlay #2018 The button for expanding the find/replace overlay to show the replace bar it quite large on MacOS and also changes its size upon different events, such activating options and scrolling in the editor target. With this change, the button style is changed to "FLAT". It results in a less space-consuming layout and fixes its size so that it does not resize on events like scrolling in the target editor. Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/2018 --- .../ui/internal/findandreplace/overlay/FindReplaceOverlay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java index 80c171dd62e..8427e36d63b 100644 --- a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java +++ b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java @@ -687,7 +687,7 @@ private void createMainContainer(final Composite parent) { } private void createReplaceToggle() { - replaceToggle = new Button(container, SWT.PUSH); + replaceToggle = new Button(container, SWT.FLAT | SWT.PUSH); GridDataFactory.fillDefaults().grab(false, true).align(GridData.BEGINNING, GridData.FILL) .applyTo(replaceToggle); replaceToggle.setToolTipText(FindReplaceMessages.FindReplaceOverlay_replaceToggle_toolTip);