From c91bd670b19c663d6993154637a684127237938c Mon Sep 17 00:00:00 2001 From: Nicolas Adment <39568358+nadment@users.noreply.github.com> Date: Sat, 18 Feb 2023 20:49:14 +0100 Subject: [PATCH] Improve the look & feel of the widgets per operating system #2395 - Some tweaks for Windows dark mode - Add some missings setLook - MetaSelectionLine initializes its own look - StyledTextComp propagate colors to text widget - Increase the height of the tab folder for Windows --- .../ui/testing/PipelineUnitTestEditor.java | 1 + .../metainject/MetaInjectDialog.java | 8 +- .../java/org/apache/hop/ui/core/PropsUi.java | 212 +++++++++++++++--- .../ui/core/database/DatabaseMetaEditor.java | 2 +- .../hop/ui/core/dialog/ContextDialog.java | 1 + .../hop/ui/core/vfs/HopVfsFileDialog.java | 10 +- .../hop/ui/core/widget/MetaSelectionLine.java | 13 +- .../hop/ui/core/widget/StyledTextComp.java | 12 + .../java/org/apache/hop/ui/hopgui/HopGui.java | 5 + .../PipelineRunConfigurationEditor.java | 1 - .../PipelineExecutionConfigurationDialog.java | 3 +- .../actions/start/ActionStartDialog.java | 2 + .../WorkflowRunConfigurationEditor.java | 1 - .../WorkflowExecutionConfigurationDialog.java | 3 +- 14 files changed, 220 insertions(+), 54 deletions(-) diff --git a/plugins/misc/testing/src/main/java/org/apache/hop/ui/testing/PipelineUnitTestEditor.java b/plugins/misc/testing/src/main/java/org/apache/hop/ui/testing/PipelineUnitTestEditor.java index c7205c1a302..17f496ea210 100644 --- a/plugins/misc/testing/src/main/java/org/apache/hop/ui/testing/PipelineUnitTestEditor.java +++ b/plugins/misc/testing/src/main/java/org/apache/hop/ui/testing/PipelineUnitTestEditor.java @@ -132,6 +132,7 @@ public void createControl(Composite parent) { fdlTestType.right = new FormAttachment(middle, -margin); wlTestType.setLayoutData(fdlTestType); wTestType = new Combo(parent, SWT.SINGLE | SWT.LEFT | SWT.BORDER); + PropsUi.setLook(wTestType); FormData fdTestType = new FormData(); fdTestType.top = new FormAttachment(wlTestType, 0, SWT.CENTER); fdTestType.left = new FormAttachment(middle, 0); diff --git a/plugins/transforms/metainject/src/main/java/org/apache/hop/pipeline/transforms/metainject/MetaInjectDialog.java b/plugins/transforms/metainject/src/main/java/org/apache/hop/pipeline/transforms/metainject/MetaInjectDialog.java index 072f452b5ad..f6a8d339f55 100644 --- a/plugins/transforms/metainject/src/main/java/org/apache/hop/pipeline/transforms/metainject/MetaInjectDialog.java +++ b/plugins/transforms/metainject/src/main/java/org/apache/hop/pipeline/transforms/metainject/MetaInjectDialog.java @@ -614,9 +614,8 @@ private void addInjectTab() { wInjectComp.setLayout(fileLayout); // Add a search bar at the top... - ToolBar treeTb = new ToolBar(wInjectComp, SWT.HORIZONTAL | SWT.FLAT); - PropsUi.setLook(treeTb); - + ToolBar treeTb = new ToolBar(wInjectComp, SWT.HORIZONTAL | SWT.FLAT); + PropsUi.setLook(treeTb, PropsUi.WIDGET_STYLE_DEFAULT); ToolItem wFilter = new ToolItem(treeTb, SWT.SEPARATOR); wSearchText = new Text(treeTb, SWT.SEARCH | SWT.CANCEL | SWT.ICON_SEARCH | SWT.ICON_CANCEL); wSearchText.setData(BaseDialog.NO_DEFAULT_HANDLER, true); @@ -669,7 +668,8 @@ private void addInjectTab() { fdTree.right = new FormAttachment(100, 0); fdTree.bottom = new FormAttachment(100, 0); wTree.setLayoutData(fdTree); - + PropsUi.setLook(wTree); + ColumnInfo[] colinf = new ColumnInfo[] { new ColumnInfo( diff --git a/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java b/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java index 046fa7b9508..33fb17007d2 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java +++ b/ui/src/main/java/org/apache/hop/ui/core/PropsUi.java @@ -48,6 +48,7 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.Widget; import java.util.HashMap; @@ -153,43 +154,29 @@ public void setDefault() { } } - // The user manually selected Dark Mode - // We'll try to change settings to make this possible. - // + // Various tweaks to improve dark theme experience on Windows if (OsHelper.isWindows() && isDarkMode()) { - display.setData("org.eclipse.swt.internal.win32.useDarkModeExplorerTheme", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.useShellTitleColoring", Boolean.TRUE); - display.setData( - "org.eclipse.swt.internal.win32.menuBarForegroundColor", + display.setData("org.eclipse.swt.internal.win32.useDarkModeExplorerTheme", true); + display.setData("org.eclipse.swt.internal.win32.useShellTitleColoring", true); + display.setData("org.eclipse.swt.internal.win32.menuBarForegroundColor", new Color(display, 0xD0, 0xD0, 0xD0)); - display.setData( - "org.eclipse.swt.internal.win32.menuBarBackgroundColor", + display.setData("org.eclipse.swt.internal.win32.menuBarBackgroundColor", new Color(display, 0x30, 0x30, 0x30)); - display.setData( - "org.eclipse.swt.internal.win32.menuBarBorderColor", + display.setData("org.eclipse.swt.internal.win32.menuBarBorderColor", new Color(display, 0x50, 0x50, 0x50)); - display.setData("org.eclipse.swt.internal.win32.Canvas.use_WS_BORDER", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.List.use_WS_BORDER", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.Table.use_WS_BORDER", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.Combo.use_WS_BORDER", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.Text.use_WS_BORDER", Boolean.TRUE); - display.setData("org.eclipse.swt.internal.win32.Tree.use_WS_BORDER", Boolean.TRUE); - display.setData( - "org.eclipse.swt.internal.win32.Table.headerLineColor", + display.setData("org.eclipse.swt.internal.win32.all.use_WS_BORDER", true); + display.setData("org.eclipse.swt.internal.win32.Table.headerLineColor", new Color(display, 0x50, 0x50, 0x50)); - display.setData( - "org.eclipse.swt.internal.win32.Label.disabledForegroundColor", + display.setData("org.eclipse.swt.internal.win32.Label.disabledForegroundColor", new Color(display, 0x80, 0x80, 0x80)); - display.setData("org.eclipse.swt.internal.win32.Combo.useDarkTheme", Boolean.TRUE); - display.setData( - "org.eclipse.swt.internal.win32.ToolBar.backgroundColor", + display.setData("org.eclipse.swt.internal.win32.Combo.useDarkTheme", true); + display.setData("org.eclipse.swt.internal.win32.ToolBar.backgroundColor", new Color(display, 0xD0, 0xD0, 0xD0)); - display.setData( - "org.eclipse.swt.internal.win32.Combo.backgroundColor", + display.setData("org.eclipse.swt.internal.win32.Combo.backgroundColor", new Color(display, 0xD0, 0xD0, 0xD0)); - display.setData("org.eclipse.swt.internal.win32.ProgressBar.useColors", Boolean.TRUE); + display.setData("org.eclipse.swt.internal.win32.ProgressBar.useColors", true); } - + if (display != null) { FontData fontData = getDefaultFont(); setProperty(STRING_FONT_DEFAULT_NAME, fontData.getName()); @@ -481,7 +468,7 @@ public void setShowTableViewToolbar(boolean show) { public static void setLook(Widget widget) { int style = WIDGET_STYLE_DEFAULT; - if (widget instanceof Table) { + if (widget instanceof Table || widget instanceof Tree) { style = WIDGET_STYLE_TABLE; } else if (widget instanceof ToolBar) { style = WIDGET_STYLE_TOOLBAR; @@ -498,15 +485,107 @@ public static void setLook(Widget widget) { } setLook(widget, style); - + if (widget instanceof Composite) { - for (Control child : ((Composite) widget).getChildren()) { + Composite composite = (Composite) widget; + for (Control child : composite.getChildren()) { setLook(child); } } } public static void setLook(final Widget widget, int style) { + if (OsHelper.isWindows()) { + setLookOnWindows(widget, style); + } else if (OsHelper.isMac()) { + setLookOnMac(widget, style); + } else { + setLookOnLinux(widget, style); + } + } + + protected static void setLookOnWindows(final Widget widget, int style) { + final GuiResource gui = GuiResource.getInstance(); + Font font = gui.getFontDefault(); + Color background = null; + Color foreground = null; + + if ( widget instanceof Shell ) { + background = gui.getColorWhite(); + foreground = gui.getColorBlack(); + Shell shell = (Shell) widget; + shell.setBackgroundMode(SWT.INHERIT_FORCE); + shell.setForeground(gui.getColorBlack()); + shell.setBackground(gui.getColorWhite()); + return; + } + + switch (style) { + case WIDGET_STYLE_DEFAULT: + background = gui.getColorWhite(); + foreground = gui.getColorBlack(); + break; + case WIDGET_STYLE_FIXED: + font = gui.getFontFixed(); + background = gui.getColorWhite(); + foreground = gui.getColorBlack(); + break; + case WIDGET_STYLE_TABLE: + if (PropsUi.getInstance().isDarkMode()) { + background = gui.getColorWhite(); + foreground = gui.getColorBlack(); + if (widget instanceof Table) { + Table table = (Table) widget; + table.setHeaderBackground(gui.getColorLightGray()); + table.setHeaderForeground(gui.getColorDarkGray()); + } + else if (widget instanceof Tree) { + Tree tree = (Tree) widget; + tree.setHeaderBackground(gui.getColorLightGray()); + tree.setHeaderForeground(gui.getColorDarkGray()); + } + } + break; + case WIDGET_STYLE_TOOLBAR: + if (PropsUi.getInstance().isDarkMode() ) { + background = gui.getColorLightGray(); + foreground = gui.getColorBlack(); + } + break; + case WIDGET_STYLE_TAB: + CTabFolder tabFolder = (CTabFolder) widget; + tabFolder.setBorderVisible(true); + tabFolder.setTabHeight(28); + if (PropsUi.getInstance().isDarkMode()) { + tabFolder.setBackground(gui.getColorWhite()); + tabFolder.setForeground(gui.getColorBlack()); + tabFolder.setSelectionBackground(gui.getColorWhite()); + tabFolder.setSelectionForeground(gui.getColorBlack()); + } + break; + case WIDGET_STYLE_PUSH_BUTTON: + break; + default: + background = gui.getColorGray(); + font = null; + break; + } + + if (font != null && !font.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setFont(font); + } + + if (background != null && !background.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setBackground(background); + } + + if (foreground != null && !foreground.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setForeground(foreground); + } + } + + + protected static void setLookOnMac(final Widget widget, int style) { final GuiResource gui = GuiResource.getInstance(); Font font = gui.getFontDefault(); Color background = gui.getColorWhite(); @@ -576,7 +655,78 @@ public static void setLook(final Widget widget, int style) { ((Control) widget).setForeground(foreground); } } + + protected static void setLookOnLinux(final Widget widget, int style) { + final GuiResource gui = GuiResource.getInstance(); + Font font = gui.getFontDefault(); + Color background = gui.getColorWhite(); + Color foreground = gui.getColorBlack(); + switch (style) { + case WIDGET_STYLE_DEFAULT: + break; + case WIDGET_STYLE_OSX_GROUP: + background = gui.getColorWhite(); + foreground = gui.getColorBlack(); + font = gui.getFontDefault(); + Group group = ((Group) widget); + group.addPaintListener( + paintEvent -> { + paintEvent.gc.setForeground(gui.getColorBlack()); + paintEvent.gc.setBackground(gui.getColorWhite()); + paintEvent.gc.fillRectangle( + 2, 0, group.getBounds().width - 8, group.getBounds().height - 20); + }); + break; + case WIDGET_STYLE_FIXED: + font = gui.getFontFixed(); + break; + case WIDGET_STYLE_TABLE: + background = gui.getColorLightGray(); + foreground = gui.getColorDarkGray(); + + Table table = (Table) widget; + table.setHeaderBackground(gui.getColorLightGray()); + table.setHeaderForeground(gui.getColorDarkGray()); + break; + case WIDGET_STYLE_TOOLBAR: + if (PropsUi.getInstance().isDarkMode()) { + background = gui.getColorLightGray(); + } else { + background = gui.getColorDemoGray(); + } + break; + case WIDGET_STYLE_TAB: + CTabFolder tabFolder = (CTabFolder) widget; + tabFolder.setBorderVisible(true); + tabFolder.setBackground(gui.getColorGray()); + tabFolder.setForeground(gui.getColorBlack()); + tabFolder.setSelectionBackground(gui.getColorWhite()); + tabFolder.setSelectionForeground(gui.getColorBlack()); + break; + case WIDGET_STYLE_PUSH_BUTTON: + background = null; + foreground = null; + break; + default: + background = gui.getColorBackground(); + font = null; + break; + } + + if (font != null && !font.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setFont(font); + } + + if (background != null && !background.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setBackground(background); + } + + if (foreground != null && !foreground.isDisposed() && (widget instanceof Control)) { + ((Control) widget).setForeground(foreground); + } + } + /** * @return Returns the display. */ diff --git a/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java b/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java index b9cee7a216a..6a05f63db30 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/core/database/DatabaseMetaEditor.java @@ -267,7 +267,7 @@ private void addGeneralTab() { fdToolBar.right = new FormAttachment(100, 0); fdToolBar.top = new FormAttachment(0, 0); wToolBar.setLayoutData(fdToolBar); - PropsUi.setLook(wToolBar); + PropsUi.setLook(wToolBar, PropsUi.WIDGET_STYLE_DEFAULT); ToolItem item = new ToolItem(wToolBar, SWT.PUSH); item.setImage(GuiResource.getInstance().getImageHelpWeb()); diff --git a/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java b/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java index bf15e0ae337..735c57ce596 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java +++ b/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java @@ -389,6 +389,7 @@ public GuiAction open() { searchComposite, SWT.LEFT | SWT.BORDER | SWT.SINGLE | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL); wSearch.setLayoutData(new GridData(GridData.FILL_BOTH)); + PropsUi.setLook(wSearch, Props.WIDGET_STYLE_TOOLBAR); // Create a toolbar at the right of the search bar... // diff --git a/ui/src/main/java/org/apache/hop/ui/core/vfs/HopVfsFileDialog.java b/ui/src/main/java/org/apache/hop/ui/core/vfs/HopVfsFileDialog.java index 3c959e17685..147f3d582fa 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/vfs/HopVfsFileDialog.java +++ b/ui/src/main/java/org/apache/hop/ui/core/vfs/HopVfsFileDialog.java @@ -296,7 +296,7 @@ public void shellClosed(ShellEvent e) { wCancel.addListener(SWT.Selection, e -> cancel()); BaseTransformDialog.positionBottomButtons( - shell, new Button[] {wOk, wCancel}, props.getMargin(), null); + shell, new Button[] {wOk, wCancel}, PropsUi.getMargin(), null); /////////////////////////////////////////////////////////////////////////////////////////////////////// // On top there are the navigation @@ -316,9 +316,9 @@ public void shellClosed(ShellEvent e) { // A toolbar above the browser, below the filename // - ToolBar navigateToolBar = new ToolBar(navigateComposite, SWT.LEFT | SWT.HORIZONTAL); + ToolBar navigateToolBar = new ToolBar(navigateComposite, SWT.LEFT | SWT.HORIZONTAL); navigateToolBar.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true)); - PropsUi.setLook(navigateToolBar); + PropsUi.setLook(navigateToolBar, PropsUi.WIDGET_STYLE_DEFAULT); navigateToolbarWidgets = new GuiToolbarWidgets(); navigateToolbarWidgets.registerGuiPluginObject(this); @@ -344,9 +344,9 @@ public void shellClosed(ShellEvent e) { SashForm sashForm = new SashForm(shell, SWT.HORIZONTAL); FormData fdSashForm = new FormData(); fdSashForm.left = new FormAttachment(0, 0); - fdSashForm.top = new FormAttachment(navigateComposite, props.getMargin()); + fdSashForm.top = new FormAttachment(navigateComposite, PropsUi.getMargin()); fdSashForm.right = new FormAttachment(100, 0); - fdSashForm.bottom = new FormAttachment(wOk, (int) (-props.getMargin() * props.getZoomFactor())); + fdSashForm.bottom = new FormAttachment(wOk, (int) (-PropsUi.getMargin() * props.getZoomFactor())); sashForm.setLayoutData(fdSashForm); PropsUi.setLook(sashForm); diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java b/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java index aef69d19a50..5f12968d288 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java +++ b/ui/src/main/java/org/apache/hop/ui/core/widget/MetaSelectionLine.java @@ -187,20 +187,19 @@ public MetaSelectionLine( // Toolbar for default actions // - wToolBar = new ToolBar(this, SWT.FLAT | SWT.HORIZONTAL); + wToolBar = new ToolBar(this, SWT.FLAT | SWT.HORIZONTAL); + PropsUi.setLook(wToolBar, PropsUi.WIDGET_STYLE_DEFAULT); FormData fdToolBar = new FormData(); fdToolBar.right = new FormAttachment(100, 0); fdToolBar.top = new FormAttachment(0, 0); wToolBar.setLayoutData(fdToolBar); - //wToolBar.setBackgroundMode(SWT.INHERIT_DEFAULT); - wToolBar.setBackground(GuiResource.getInstance().getColorGreen()); - //wToolBar.setForeground(GuiResource.getInstance().getColorBackground()); - + // Add more toolbar items from plugins. // GuiToolbarWidgets toolbarWidgets = new GuiToolbarWidgets(); - toolbarWidgets.registerGuiPluginObject(this); - toolbarWidgets.setItemBackgroundColor(GuiResource.getInstance().getColorBackground()); + toolbarWidgets.registerGuiPluginObject(this); + // Removed for Windows dark mode + // toolbarWidgets.setItemBackgroundColor(GuiResource.getInstance().getColorBackground()); toolbarWidgets.createToolbarWidgets(wToolBar, GUI_PLUGIN_TOOLBAR_PARENT_ID); int textFlags = SWT.SINGLE | SWT.LEFT | SWT.BORDER; diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java b/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java index 8e096800f91..9a35f713514 100644 --- a/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java +++ b/ui/src/main/java/org/apache/hop/ui/core/widget/StyledTextComp.java @@ -162,6 +162,18 @@ public void setSelection(int arg0, int arg1) { textWidget.setSelection(arg0, arg1); } + @Override + public void setBackground(Color color) { + super.setBackground(color); + textWidget.setBackground(color); + } + + @Override + public void setForeground(Color color) { + super.setForeground(color); + textWidget.setForeground(color); + } + @Override public void setFont(Font fnt) { textWidget.setFont(fnt); diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java index 0ce39a97d62..8ee185a0833 100644 --- a/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java +++ b/ui/src/main/java/org/apache/hop/ui/hopgui/HopGui.java @@ -590,6 +590,11 @@ private static Display setupDisplay() { // Bootstrap Hop // Display display = new Display(); + + // Initialize early for some tweaks (before shell creation) + // + PropsUi.getInstance(); + return display; } diff --git a/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java b/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java index d580c903e46..c843f346d7e 100644 --- a/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/pipeline/config/PipelineRunConfigurationEditor.java @@ -242,7 +242,6 @@ public void createControl(Composite parent) { PKG, "PipelineRunConfigurationDialog.label.ExecutionInfoLocation"), BaseMessages.getString( PKG, "PipelineRunConfigurationDialog.toolTip.ExecutionInfoLocation")); - PropsUi.setLook(wExecutionInfoLocation); FormData fdExecutionInfoLocation = new FormData(); fdExecutionInfoLocation.top = new FormAttachment(lastControl, margin); fdExecutionInfoLocation.left = new FormAttachment(0, 0); // To the right of the label diff --git a/ui/src/main/java/org/apache/hop/ui/pipeline/dialog/PipelineExecutionConfigurationDialog.java b/ui/src/main/java/org/apache/hop/ui/pipeline/dialog/PipelineExecutionConfigurationDialog.java index e36bcf4f934..c1c0853cac5 100644 --- a/ui/src/main/java/org/apache/hop/ui/pipeline/dialog/PipelineExecutionConfigurationDialog.java +++ b/ui/src/main/java/org/apache/hop/ui/pipeline/dialog/PipelineExecutionConfigurationDialog.java @@ -155,10 +155,9 @@ private void addRunConfigurationSectionLayout() { runConfigTooltip, true); wRunConfigurationControl = wRunConfiguration; - PropsUi.setLook(wRunConfiguration); FormData fdRunConfiguration = new FormData(); fdRunConfiguration.right = new FormAttachment(100, 0); - fdRunConfiguration.top = new FormAttachment(0, props.getMargin()); + fdRunConfiguration.top = new FormAttachment(0, PropsUi.getMargin()); fdRunConfiguration.left = new FormAttachment(0, 0); wRunConfiguration.setLayoutData(fdRunConfiguration); } diff --git a/ui/src/main/java/org/apache/hop/ui/workflow/actions/start/ActionStartDialog.java b/ui/src/main/java/org/apache/hop/ui/workflow/actions/start/ActionStartDialog.java index 1417c6a4f2c..1449601c720 100644 --- a/ui/src/main/java/org/apache/hop/ui/workflow/actions/start/ActionStartDialog.java +++ b/ui/src/main/java/org/apache/hop/ui/workflow/actions/start/ActionStartDialog.java @@ -137,6 +137,7 @@ public IAction open() { wRepeat.addListener(SWT.Selection, e -> enableDisableControls()); Group gRepeat = new Group(shell, SWT.SHADOW_NONE); + PropsUi.setLook(gRepeat); gRepeat.setText(BaseMessages.getString(PKG, "ActionStart.Repeat.Label")); FormData fdgRepeat = new FormData(); fdgRepeat.left = new FormAttachment(0, 0); @@ -160,6 +161,7 @@ public IAction open() { wlType.setLayoutData(fdlType); wType = new CCombo(gRepeat, SWT.SINGLE | SWT.LEFT | SWT.BORDER); + PropsUi.setLook(wType); wType.addListener(SWT.Selection, arg0 -> enableDisableControls()); wType.setItems(new String[] {NO_SCHEDULING, INTERVAL, DAILY, WEEKLY, MONTHLY}); wType.setEditable(false); diff --git a/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java b/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java index 4e70976cf4d..2f89c50c223 100644 --- a/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java +++ b/ui/src/main/java/org/apache/hop/ui/workflow/config/WorkflowRunConfigurationEditor.java @@ -207,7 +207,6 @@ public void createControl(Composite parent) { PKG, "WorkflowRunConfigurationDialog.label.ExecutionInfoLocation"), BaseMessages.getString( PKG, "WorkflowRunConfigurationDialog.toolTip.ExecutionInfoLocation"), false, true); - PropsUi.setLook(wExecutionInfoLocation); FormData fdExecutionInfoLocation = new FormData(); fdExecutionInfoLocation.top = new FormAttachment(lastControl, margin); fdExecutionInfoLocation.left = new FormAttachment(0, 0); // To the right of the label diff --git a/ui/src/main/java/org/apache/hop/ui/workflow/dialog/WorkflowExecutionConfigurationDialog.java b/ui/src/main/java/org/apache/hop/ui/workflow/dialog/WorkflowExecutionConfigurationDialog.java index 34fbb516b6f..5866914ed26 100644 --- a/ui/src/main/java/org/apache/hop/ui/workflow/dialog/WorkflowExecutionConfigurationDialog.java +++ b/ui/src/main/java/org/apache/hop/ui/workflow/dialog/WorkflowExecutionConfigurationDialog.java @@ -185,10 +185,9 @@ private void addRunConfigurationSectionLayout() { runConfigTooltip, true); wRunConfigurationControl = wRunConfiguration; - PropsUi.setLook(wRunConfiguration); FormData fdRunConfiguration = new FormData(); fdRunConfiguration.right = new FormAttachment(100, 0); - fdRunConfiguration.top = new FormAttachment(0, props.getMargin()); + fdRunConfiguration.top = new FormAttachment(0, PropsUi.getMargin()); fdRunConfiguration.left = new FormAttachment(0, 0); wRunConfiguration.setLayoutData(fdRunConfiguration); }