@@ -25,21 +25,15 @@ public class Snippet384 {
2525
2626 private static Display display = new Display ();
2727
28- private static final boolean ENABLE_DARK_MODE = false ;
29-
3028 private static final Color LIGHT_THEME_BACKGROUND = display .getSystemColor (SWT .COLOR_WIDGET_BACKGROUND );
3129 private static final Color DARK_THEME_GRAY = new Color (47 , 47 , 47 );
3230 private static final Color DARK_THEME_GRAY_DARKER = new Color (72 , 72 , 76 );
3331
3432 // colors and thresholds used in the current Win32/macOS algorithm
3533 private static final RGB GRAY_LOW = display .getSystemColor (SWT .COLOR_WIDGET_NORMAL_SHADOW ).getRGB (); // == RGB(160, 160, 160) on Windows
36-
3734 private static final RGB GRAY_HIGH = display .getSystemColor (SWT .COLOR_WIDGET_BACKGROUND ).getRGB (); // == RGB(240, 240,240) on Windows
38-
3935 private static final int WIN32_COCOA_THRESHOLD = 98304 ; // == 3 * 2^15, this is the real threshold used in Win32/macOS
40-
4136 private static final int BACKGROUND_THRESHOLD = GRAY_HIGH .red * GRAY_HIGH .red + GRAY_HIGH .green + GRAY_HIGH .green + GRAY_HIGH .blue * GRAY_HIGH .blue ; // == on windows 240^2 * 3
42-
4337 private static final int MAX_BRIGHTNESS = 256 * 256 * 3 ;
4438
4539 // change these to adjust the sliders default values
@@ -125,7 +119,6 @@ public static void main(String[] args) {
125119 addImageUpdateScaleListener (highScale , adjThreshAdditGray , adjThreshAdditGray ::setThresholdHigh , imageRowStorage , originalImages );
126120 addImageUpdateScaleListener (thirdGray , adjThreshAdditGray , value -> adjThreshAdditGray .setGrayMid (new RGB (value , value , value )), imageRowStorage , originalImages );
127121
128-
129122 // combo box for theme selection
130123 Combo themeCombo = new Combo (shell , SWT .DROP_DOWN | SWT .READ_ONLY );
131124 themeCombo .setItems ("Light Theme" , "Dark Theme" , "Darker Theme" );
@@ -147,7 +140,6 @@ public static void main(String[] args) {
147140 }
148141 });
149142
150-
151143 shell .open ();
152144 shell .layout ();
153145
@@ -158,9 +150,7 @@ public static void main(String[] args) {
158150 }
159151
160152 originalImages .forEach (Image ::dispose );
161-
162153 display .dispose ();
163-
164154 }
165155
166156 private static void addTransformationRow (Composite parent , String labelText , PixelTransformer transformer ,
0 commit comments