44import de .lars .openrgbplugin .OutputHandler ;
55import de .lars .openrgbplugin .utils .UserInterfaceUtil ;
66import de .lars .openrgbplugin .utils .ValueHolder ;
7- import de .lars .remotelightclient .ui .Style ;
87import de .lars .remotelightclient .ui .components .ListElement ;
98import de .lars .remotelightclient .ui .panels .tools .ToolsNavListener ;
109import de .lars .remotelightclient .ui .panels .tools .ToolsPanel ;
11- import de .lars .remotelightclient .utils .ui .UiUtils ;
1210import de .lars .remotelightcore .devices .Device ;
1311import de .lars .remotelightcore .devices .virtual .VirtualOutput ;
1412import de .lars .remotelightcore .notification .Notification ;
1513import de .lars .remotelightcore .notification .NotificationType ;
14+ import de .lars .remotelightplugincompat .StyleCompat ;
15+ import de .lars .remotelightplugincompat .UiUtilsCompat ;
1616
1717import javax .swing .*;
1818import java .awt .*;
@@ -40,11 +40,11 @@ public SetupPanel(ToolsPanel context, OutputHandler handler, DeviceGroupsPanel d
4040 else
4141 listDevices = new ArrayList <>();
4242
43- setBackground (Style .panelBackground );
43+ setBackground (StyleCompat .panelBackground () );
4444 setLayout (new BorderLayout ());
4545
4646 panelSettings = new JPanel ();
47- panelSettings .setBackground (Style .panelDarkBackground );
47+ panelSettings .setBackground (StyleCompat .panelDarkBackground () );
4848 panelSettings .setBorder (BorderFactory .createEmptyBorder (5 , 5 , 5 , 5 ));
4949 panelSettings .setLayout (new BoxLayout (panelSettings , BoxLayout .Y_AXIS ));
5050
@@ -64,13 +64,13 @@ public SetupPanel(ToolsPanel context, OutputHandler handler, DeviceGroupsPanel d
6464 */
6565 private void initSettingsPanel () {
6666 JLabel lblName = new JLabel ("Name:" );
67- lblName .setForeground (Style .textColor );
67+ lblName .setForeground (StyleCompat .textColor () );
6868
6969 JTextField fieldName = new JTextField (20 );
7070 panelSettings .add (UserInterfaceUtil .createSettingBgr (lblName , fieldName ));
7171
7272 JLabel lblVirtOutput = new JLabel ("VirtualOutput:" );
73- lblVirtOutput .setForeground (Style .textColor );
73+ lblVirtOutput .setForeground (StyleCompat .textColor () );
7474
7575 JComboBox <String > comboVirtOutputs = new JComboBox <>();
7676 for (Device device : instance .getInterface ().getDeviceManager ().getDevices ()) {
@@ -86,12 +86,12 @@ private void initSettingsPanel() {
8686 panelSettings .add (UserInterfaceUtil .createSettingBgr (lblVirtOutput , comboVirtOutputs ));
8787
8888 JLabel lblDeviceId = new JLabel ("OpenRGB Device ID (index):" );
89- lblDeviceId .setForeground (Style .textColor );
89+ lblDeviceId .setForeground (StyleCompat .textColor () );
9090
9191 JFormattedTextField fieldDeviceId = new JFormattedTextField (UserInterfaceUtil .getIntFieldFormatter ());
9292 fieldDeviceId .setColumns (5 );
9393 JButton btnAddDeviceId = new JButton ("Add device" );
94- UiUtils .configureButton (btnAddDeviceId );
94+ UiUtilsCompat .configureButton (btnAddDeviceId );
9595 btnAddDeviceId .addActionListener (e -> {
9696 if (fieldDeviceId .getValue () == null ) return ;
9797 int value = (int ) fieldDeviceId .getValue ();
@@ -111,10 +111,10 @@ private void initSettingsPanel() {
111111 int deviceCount = instance .getOpenRGB ().getControllerCount ();
112112
113113 JLabel lblCountInfo = new JLabel ("There are " + deviceCount + " devices available." );
114- lblCountInfo .setForeground (Style .textColor );
114+ lblCountInfo .setForeground (StyleCompat .textColor () );
115115
116116 JButton btnAddAll = new JButton ("Add all" );
117- UiUtils .configureButton (btnAddAll );
117+ UiUtilsCompat .configureButton (btnAddAll );
118118 btnAddAll .addActionListener (e -> {
119119 for (int i = 0 ; i < deviceCount ; i ++) {
120120 if (!listDevices .contains (i ))
@@ -124,7 +124,7 @@ private void initSettingsPanel() {
124124 });
125125
126126 JButton btnRemoveAll = new JButton ("Remove all" );
127- UiUtils .configureButton (btnRemoveAll );
127+ UiUtilsCompat .configureButton (btnRemoveAll );
128128 btnRemoveAll .addActionListener (e -> {
129129 listDevices .clear ();
130130 updateDeviceListPanel ();
@@ -135,12 +135,12 @@ private void initSettingsPanel() {
135135 } else {
136136 // show hint message
137137 JLabel lblHint = new JLabel ("(i) Go back and connect the client to receive live data from the SDK server." );
138- lblHint .setForeground (Style .textColorDarker );
138+ lblHint .setForeground (StyleCompat .textColorDarker () );
139139 panelSettings .add (UserInterfaceUtil .createSettingBgr (lblHint ));
140140 }
141141
142142 panelDeviceList = new JPanel ();
143- panelDeviceList .setBackground (Style .panelDarkBackground );
143+ panelDeviceList .setBackground (StyleCompat .panelDarkBackground () );
144144 panelDeviceList .setLayout (new BoxLayout (panelDeviceList , BoxLayout .Y_AXIS ));
145145 panelDeviceList .setAlignmentX (Component .LEFT_ALIGNMENT );
146146 panelSettings .add (Box .createVerticalStrut (10 ));
@@ -153,7 +153,7 @@ private void initSettingsPanel() {
153153 }
154154
155155 JButton btnAdd = new JButton (handler == null ? "Add OpenRGB Device" : "Save OpenRGB Device" );
156- UiUtils .configureButton (btnAdd );
156+ UiUtilsCompat .configureButton (btnAdd );
157157 btnAdd .setAlignmentX (Component .LEFT_ALIGNMENT );
158158 btnAdd .setMaximumSize (new Dimension (Integer .MAX_VALUE , 50 ));
159159 btnAdd .setMinimumSize (new Dimension (100 , 50 ));
@@ -231,7 +231,7 @@ private void updateDeviceListPanel() {
231231 panelDeviceList .add (Box .createVerticalStrut (5 ));
232232
233233 JLabel lblDeviceId = new JLabel ("Device #" + deviceId );
234- lblDeviceId .setForeground (Style .textColor );
234+ lblDeviceId .setForeground (StyleCompat .textColor () );
235235 el .add (lblDeviceId );
236236
237237 if (isConnected ) {
@@ -240,15 +240,15 @@ private void updateDeviceListPanel() {
240240 if (deviceId >= controllerCount ) {
241241 // invalid device id
242242 JLabel lblError = new JLabel ("Invalid device ID. Available devices up to ID " + (controllerCount -1 ));
243- lblError .setForeground (Style .error );
243+ lblError .setForeground (StyleCompat .error () );
244244 el .add (lblError );
245245 } else {
246246 de .lars .openrgbwrapper .Device device = instance .getOpenRGB ().getControllerData (deviceId );
247247 String text = String .format ("%s (%s), %d LEDs" ,
248248 device .name , device .type .name (), device .leds .length );
249249
250250 JLabel lblInfo = new JLabel (text );
251- lblInfo .setForeground (Style .textColorDarker );
251+ lblInfo .setForeground (StyleCompat .textColorDarker () );
252252 lblInfo .setMaximumSize (new Dimension (800 , lblInfo .getPreferredSize ().height ));
253253 el .add (lblInfo );
254254 }
@@ -313,7 +313,7 @@ private void configurePanelButton(JButton btn) {
313313 btn .setFocusPainted (false );
314314 btn .setBorderPainted (false );
315315 btn .setBorder (null );
316- btn .setForeground (btn .isEnabled () ? Style .textColor : Style .textColorDarker );
316+ btn .setForeground (btn .isEnabled () ? StyleCompat .textColor () : StyleCompat .textColorDarker () );
317317 btn .setCursor (new Cursor (Cursor .HAND_CURSOR ));
318318 btn .setFont (new Font (Font .DIALOG , Font .PLAIN , 13 ));
319319 }
0 commit comments