Skip to content

Commit af86b72

Browse files
committed
Simplifying dealing with Colors in tests
There is no need to go through RGB, cache and etc. complications.
1 parent dfdd99b commit af86b72

File tree

3 files changed

+136
-156
lines changed

3 files changed

+136
-156
lines changed

tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.eclipse.swt.events.SelectionAdapter;
1919
import org.eclipse.swt.events.SelectionEvent;
2020
import org.eclipse.swt.graphics.Color;
21-
import org.eclipse.swt.graphics.RGB;
2221
import org.eclipse.swt.layout.GridData;
2322
import org.eclipse.swt.layout.GridLayout;
2423
import org.eclipse.swt.widgets.Button;
@@ -81,7 +80,7 @@ public void widgetSelected(SelectionEvent arg0) {
8180
}
8281
});
8382

84-
color = new Color(new RGB(31,150,192));
83+
color = new Color(31,150,192);
8584

8685
}
8786

tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug558222_BlackIcon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void main(String[] args) {
4444
*/
4545
Color border = display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW);
4646
Color background = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
47-
Color backgroundHot = new Color(new RGB(252, 160, 160));
47+
Color backgroundHot = new Color(252, 160, 160);
4848
Color transparent = display.getSystemColor(SWT.COLOR_MAGENTA);
4949

5050
PaletteData palette = new PaletteData(new RGB[] { transparent.getRGB(), border.getRGB(), background.getRGB(), backgroundHot.getRGB() });

0 commit comments

Comments
 (0)