This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 7fc5a8b94f Small change to the layout of the search box for border
#6362 (#6366)
7fc5a8b94f is described below
commit 7fc5a8b94f8ec78299307e8899169e39711424af
Author: Nicolas Adment <[email protected]>
AuthorDate: Tue Jan 13 19:18:09 2026 +0100
Small change to the layout of the search box for border #6362 (#6366)
---
.../perspective/explorer/ExplorerPerspective.java | 26 +++++++++++++++-------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
index 62f6da842c..cb4ba4a9e0 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java
@@ -399,7 +399,7 @@ public class ExplorerPerspective implements
IHopPerspective, TabClosable {
protected void createTree(Composite parent) {
// Create composite
//
- treeComposite = new Composite(parent, SWT.BORDER);
+ treeComposite = new Composite(parent, SWT.NONE);
FormLayout layout = new FormLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
@@ -439,21 +439,31 @@ public class ExplorerPerspective implements
IHopPerspective, TabClosable {
}
});
+ // Create a composite with toolbar and tree for the border
+ Composite composite = new Composite(treeComposite, SWT.BORDER);
+ composite.setLayout(new FormLayout());
+ FormData layoutData = new FormData();
+ layoutData.left = new FormAttachment(0, 0);
+ layoutData.top = new FormAttachment(searchText, PropsUi.getMargin());
+ layoutData.right = new FormAttachment(100, 0);
+ layoutData.bottom = new FormAttachment(100, 0);
+ composite.setLayoutData(layoutData);
+
// Create toolbar
//
- toolBar = new ToolBar(treeComposite, SWT.WRAP | SWT.LEFT | SWT.HORIZONTAL);
+ toolBar = new ToolBar(composite, SWT.WRAP | SWT.LEFT | SWT.HORIZONTAL);
toolBarWidgets = new GuiToolbarWidgets();
toolBarWidgets.registerGuiPluginObject(this);
toolBarWidgets.createToolbarWidgets(toolBar, GUI_PLUGIN_TOOLBAR_PARENT_ID);
- FormData layoutData = new FormData();
- layoutData.left = new FormAttachment(0, 0);
- layoutData.top = new FormAttachment(searchText, PropsUi.getMargin());
- layoutData.right = new FormAttachment(100, 0);
- toolBar.setLayoutData(layoutData);
+ FormData toolBarFormData = new FormData();
+ toolBarFormData.left = new FormAttachment(0, 0);
+ toolBarFormData.top = new FormAttachment(0, 0);
+ toolBarFormData.right = new FormAttachment(100, 0);
+ toolBar.setLayoutData(toolBarFormData);
toolBar.pack();
PropsUi.setLook(toolBar, Props.WIDGET_STYLE_TOOLBAR);
- tree = new Tree(treeComposite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree = new Tree(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
tree.setHeaderVisible(false);
tree.addListener(SWT.Selection, event -> updateSelection());
tree.addListener(SWT.DefaultSelection, this::openFile);