diff options
author | Jonah Graham | 2020-05-13 22:49:30 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-06-11 13:32:20 +0000 |
commit | 89d25414f0d37b84ffa3b07444a99a6e4be18732 (patch) | |
tree | ba97c81b202f87077918b37da989eca665795255 /tests/org.eclipse.swt.tests.gtk/ManualTests/org | |
parent | 7c367b4a6beb09d3caf68266d5495db6790afefa (diff) | |
download | eclipse.platform.swt-89d25414f0d37b84ffa3b07444a99a6e4be18732.tar.gz eclipse.platform.swt-89d25414f0d37b84ffa3b07444a99a6e4be18732.tar.xz eclipse.platform.swt-89d25414f0d37b84ffa3b07444a99a6e4be18732.zip |
Bug 563560: Stop using Color constructors which take a device
Change-Id: I3037f38fa716a7d8486ee7998f90e8fe0a493367
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Diffstat (limited to 'tests/org.eclipse.swt.tests.gtk/ManualTests/org')
8 files changed, 30 insertions, 30 deletions
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java index 8d244b5d13..ae3783cba6 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java @@ -81,7 +81,7 @@ createComposites(false); } }); -color = new Color(display, new RGB(31,150,192)); +color = new Color(new RGB(31,150,192)); } diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug175964_LTRClippingGC.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug175964_LTRClippingGC.java index 86a300b898..be0bd71796 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug175964_LTRClippingGC.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug175964_LTRClippingGC.java @@ -35,7 +35,7 @@ public class Bug175964_LTRClippingGC { static Color lightGray; public static void main(String [] args) { Display display = new Display(); - lightGray = new Color(null, 192, 192, 192); + lightGray = new Color(192, 192, 192); final Image image = display.getSystemImage(SWT.ICON_INFORMATION); Shell shell = new Shell(display); shell.setText("Clipping rectangle for an RTL widget.tree");//"Images on the right side of the TreeItem"); diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug307441_DnDOverlappingControls.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug307441_DnDOverlappingControls.java index 7eff00e018..032b15c2b7 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug307441_DnDOverlappingControls.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug307441_DnDOverlappingControls.java @@ -62,13 +62,13 @@ public static void main (String [] args) { Rectangle clientArea = dropComp.getClientArea(); final Label label2 = new Label (dropComp, SWT.BORDER); - label2.setBackground(new Color(null,255,255,0)); + label2.setBackground(new Color(255,255,0)); label2.setText("DropLabel1"); label2.setSize(100,100); label2.setBounds(clientArea.x, clientArea.y, clientArea.width, (clientArea.height*2)/3); final Label label3 = new Label (dropComp, SWT.BORDER); - label3.setBackground(new Color(null, 255, 0,0)); + label3.setBackground(new Color(255, 0, 0)); label3.setText("DropLabel2"); label3.setSize(100,100); label3.setBounds(clientArea.x+10, clientArea.y+clientArea.height/3, clientArea.width-10, clientArea.height/2); @@ -171,7 +171,7 @@ public static void setDropTarget (final Control control) { event.detail = DND.DROP_NONE; return; } - control.setBackground(new Color(null,0,0,255)); + control.setBackground(new Color(0,0,255)); } @Override public void dragLeave(DropTargetEvent arg0) { diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug393723_checkForegroundBug.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug393723_checkForegroundBug.java index 586ff4e035..5d3628f6e4 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug393723_checkForegroundBug.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug393723_checkForegroundBug.java @@ -30,7 +30,7 @@ public static void main(String[] args) { System.out.println("shell fore=" + shell.getForeground()); System.out.println("back=" + comp.getBackground()); System.out.println("fore=" + comp.getForeground()); - shell.setForeground(new Color(display, 240, 240, 240)); + shell.setForeground(new Color(240, 240, 240)); comp.setBackground(display.getSystemColor(SWT.COLOR_WHITE)); System.out.println("after"); System.out.println("shell back=" + shell.getBackground()); diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug477950_SystemColors.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug477950_SystemColors.java index 1646afa1c5..2c081f5d97 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug477950_SystemColors.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug477950_SystemColors.java @@ -59,64 +59,64 @@ public class Bug477950_SystemColors { actualRGBA.setWidth(150); Color [] colArray; Map<String, Color []> map = new HashMap<>(); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW), new Color (display, 0,0,0)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW), new Color (0, 0,0)}; map.put("COLOR_WIDGET_DARK_SHADOW", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), new Color (display, 164,164,161)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), new Color (164, 164,161)}; map.put("COLOR_WIDGET_NORMAL_SHADOW", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW), new Color (display, 232,232,231)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW), new Color (232, 232,231)}; map.put("COLOR_WIDGET_LIGHT_SHADOW", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW), new Color (255, 255,255)}; map.put("COLOR_WIDGET_HIGHLIGHT_SHADOW", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND), new Color (display, 46,52,54)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND), new Color (46, 52,54)}; map.put("COLOR_WIDGET_FOREGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND), new Color (display, 232,232,231)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND), new Color (232, 232,231)}; map.put("COLOR_WIDGET_BACKGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_BORDER), new Color (display, 0,0,0)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_WIDGET_BORDER), new Color (0, 0,0)}; map.put("COLOR_WIDGET_BORDER", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_FOREGROUND), new Color (display, 0,0,0)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_FOREGROUND), new Color (0, 0,0)}; map.put("COLOR_LIST_FOREGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_BACKGROUND), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_BACKGROUND), new Color (255, 255,255)}; map.put("COLOR_LIST_BACKGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_SELECTION), new Color (display, 74,144,217)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_SELECTION), new Color (74, 144,217)}; map.put("COLOR_LIST_SELECTION", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT), new Color (255, 255,255)}; map.put("COLOR_LIST_SELECTION_TEXT", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_INFO_FOREGROUND), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_INFO_FOREGROUND), new Color (255, 255,255)}; map.put("COLOR_INFO_FOREGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_INFO_BACKGROUND), new Color (display, 0,0,0)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_INFO_BACKGROUND), new Color (0, 0,0)}; map.put("COLOR_INFO_BACKGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_FOREGROUND), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_FOREGROUND), new Color (255, 255,255)}; map.put("COLOR_TITLE_FOREGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_BACKGROUND), new Color (display, 74,144,217)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_BACKGROUND), new Color (74, 144,217)}; map.put("COLOR_TITLE_BACKGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT), new Color (display, 133,188,246)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT), new Color (133, 188,246)}; map.put("COLOR_TITLE_BACKGROUND_GRADIENT", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND), new Color (display, 139,142,143)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND), new Color (139, 142,143)}; map.put("COLOR_TITLE_INACTIVE_FOREGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND), new Color (display, 241,241,241)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND), new Color (241, 241,241)}; map.put("COLOR_TITLE_INACTIVE_BACKGROUND", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT), new Color (display, 255,255,255)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT), new Color (255, 255,255)}; map.put("COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT", colArray); - colArray = new Color [] {display.getSystemColor(SWT.COLOR_LINK_FOREGROUND), new Color (display, 42,118,198)}; + colArray = new Color [] {display.getSystemColor(SWT.COLOR_LINK_FOREGROUND), new Color (42, 118,198)}; map.put("COLOR_LINK_FOREGROUND", colArray); for (Entry<String, Color[]> entry : map.entrySet()) { diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug530969_ControlPrint.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug530969_ControlPrint.java index 96e2e063fb..84c50e0a78 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug530969_ControlPrint.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug530969_ControlPrint.java @@ -50,7 +50,7 @@ public class Bug530969_ControlPrint { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display, SWT.NO_TRIM); - Color gray = new Color (display, 222, 223, 224); + Color gray = new Color (222, 223, 224); Composite composite = new Composite(shell, SWT.NONE); RowLayout layout = new RowLayout(); layout.marginTop = 0; diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug558222_BlackIcon.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug558222_BlackIcon.java index e7f167b49d..eb6a672eab 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug558222_BlackIcon.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug558222_BlackIcon.java @@ -44,7 +44,7 @@ public class Bug558222_BlackIcon { */ Color border = display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW); Color background = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); - Color backgroundHot = new Color(display, new RGB(252, 160, 160)); + Color backgroundHot = new Color(new RGB(252, 160, 160)); Color transparent = display.getSystemColor(SWT.COLOR_MAGENTA); PaletteData palette = new PaletteData(new RGB[] { transparent.getRGB(), border.getRGB(), background.getRGB(), backgroundHot.getRGB() }); diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug85131_ToolTipSetNull.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug85131_ToolTipSetNull.java index b3af29d837..a804d46134 100644 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug85131_ToolTipSetNull.java +++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug85131_ToolTipSetNull.java @@ -48,9 +48,9 @@ public class Bug85131_ToolTipSetNull int hm = r.height/8; int rw = w2-wm, rh = r.height-2*hm; - e.gc.setBackground( new Color(null,200,0,0) ); + e.gc.setBackground( new Color(200,0,0) ); e.gc.fillRectangle( 0,hm,w2,rh); - e.gc.setBackground( new Color(null,0,0,200) ); + e.gc.setBackground( new Color(0,0,200) ); e.gc.fillRectangle( w2,hm+hm,rw+wm,rh-hm); } }); |