mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert incompatible API changes in Darcula LaF
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@ public class DarculaButtonPainter implements Border, UIResource {
|
||||
}
|
||||
|
||||
public Color getBorderColor(Component button) {
|
||||
return button.isEnabled() && DarculaButtonUI.isDefaultButton(button) ?
|
||||
return button.isEnabled() && DarculaButtonUI.isDefaultButton((JComponent)button) ?
|
||||
new ColorUIResource(0x3B608A) : new ColorUIResource(0x5E6060);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public class DarculaButtonUI extends BasicButtonUI {
|
||||
return c instanceof JButton && "square".equals(((JButton)c).getClientProperty("JButton.buttonType"));
|
||||
}
|
||||
|
||||
public static boolean isDefaultButton(Component c) {
|
||||
public static boolean isDefaultButton(JComponent c) {
|
||||
return c instanceof JButton && ((JButton)c).isDefaultButton();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ import static com.intellij.ide.ui.laf.darcula.DarculaUIUtil.*;
|
||||
@SuppressWarnings("GtkPreferredJComboBoxRenderer")
|
||||
public class DarculaComboBoxUI extends BasicComboBoxUI implements Border, ErrorBorderCapable {
|
||||
|
||||
public DarculaComboBoxUI() {}
|
||||
|
||||
@Deprecated
|
||||
public DarculaComboBoxUI(JComboBox unused) {}
|
||||
|
||||
@SuppressWarnings({"MethodOverridesStaticMethodOfSuperclass", "unused"})
|
||||
public static ComponentUI createUI(final JComponent c) {
|
||||
return new DarculaComboBoxUI();
|
||||
|
||||
+9
@@ -64,6 +64,15 @@ public abstract class TextFieldWithPopupHandlerUI extends BasicTextFieldUI imple
|
||||
private Object variant;
|
||||
private int cursor;
|
||||
|
||||
@Deprecated
|
||||
protected JTextField myTextField;
|
||||
|
||||
public TextFieldWithPopupHandlerUI() {}
|
||||
|
||||
@Deprecated
|
||||
public TextFieldWithPopupHandlerUI(JTextField textField) {
|
||||
myTextField = textField;
|
||||
}
|
||||
/**
|
||||
* @param insets a border insets without a space for icons
|
||||
* @see javax.swing.border.Border#getBorderInsets
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide.ui.laf.intellij;
|
||||
|
||||
import com.intellij.ide.ui.laf.IconCache;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @Deprecated use {@link IconCache} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public class MacIntelliJIconCache {
|
||||
@Deprecated
|
||||
public static Icon getIcon(String name) {
|
||||
return IconCache.getIcon(name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user