mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Plugins management 2019: darcula
GitOrigin-RevId: 1de11b927d93d7b702ea1d5be317b054de46f5ab
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c70f853c75
commit
eb6057f3c2
+2
-1
@@ -84,8 +84,9 @@ public class PluginManagerConfigurableNew
|
||||
private static final DecimalFormat K_FORMAT = new DecimalFormat("###.#K");
|
||||
private static final DecimalFormat M_FORMAT = new DecimalFormat("###.#M");
|
||||
|
||||
@SuppressWarnings("UseJBColor")
|
||||
public static final Color MAIN_BG_COLOR =
|
||||
JBColor.namedColor("Plugins.background", new JBColor(UIUtil.getListBackground(), new Color(0x313335)));
|
||||
JBColor.namedColor("Plugins.background", new JBColor(() -> JBColor.isBright() ? UIUtil.getListBackground() : new Color(0x313335)));
|
||||
|
||||
public static final Color SEARCH_BG_COLOR = JBColor.namedColor("Plugins.SearchField.background", MAIN_BG_COLOR);
|
||||
|
||||
|
||||
+3
-10
@@ -4,7 +4,6 @@ package com.intellij.ide.plugins.newui;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.BrowserUtil;
|
||||
import com.intellij.ide.plugins.*;
|
||||
import com.intellij.ide.ui.laf.darcula.ui.TextFieldWithPopupHandlerUI;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -27,7 +26,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.TextUI;
|
||||
import javax.swing.text.html.HTMLEditorKit;
|
||||
import javax.swing.text.html.StyleSheet;
|
||||
import java.awt.*;
|
||||
@@ -85,7 +83,7 @@ public class PluginDetailsPageComponent extends MultiPanel {
|
||||
}
|
||||
if (key == 1) {
|
||||
myEmptyPanel = new JBPanelWithEmptyText();
|
||||
myEmptyPanel.setBorder(new CustomLineBorder(new JBColor(0xC5C5C5, 0x515151), JBUI.insets(1, 0, 0, 0)));
|
||||
myEmptyPanel.setBorder(new CustomLineBorder(PluginManagerConfigurableNew.SEARCH_FIELD_BORDER_COLOR, JBUI.insets(1, 0, 0, 0)));
|
||||
myEmptyPanel.setOpaque(true);
|
||||
myEmptyPanel.setBackground(PluginManagerConfigurableNew.MAIN_BG_COLOR);
|
||||
return myEmptyPanel;
|
||||
@@ -199,13 +197,8 @@ public class PluginDetailsPageComponent extends MultiPanel {
|
||||
|
||||
private void createMetricsPanel(@NotNull JPanel centerPanel) {
|
||||
// text field without horizontal margins
|
||||
myVersion = new JTextField() {
|
||||
@Override
|
||||
public void setUI(TextUI ui) {
|
||||
super.setUI(new TextFieldWithPopupHandlerUI() {
|
||||
});
|
||||
}
|
||||
};
|
||||
myVersion = new JTextField();
|
||||
myVersion.putClientProperty("TextFieldWithoutMargins", Boolean.TRUE);
|
||||
myVersion.setEditable(false);
|
||||
myVersion.setFont(UIUtil.getLabelFont());
|
||||
myVersion.setBorder(null);
|
||||
|
||||
@@ -8,13 +8,11 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonShortcuts;
|
||||
import com.intellij.openapi.actionSystem.CustomShortcutSet;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.util.ActionCallback;
|
||||
import com.intellij.openapi.ui.Divider;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.ui.DocumentAdapter;
|
||||
import com.intellij.ui.OnePixelSplitter;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.components.JBTextField;
|
||||
import com.intellij.ui.components.labels.LinkListener;
|
||||
import com.intellij.util.Alarm;
|
||||
@@ -79,11 +77,6 @@ public abstract class PluginsTab {
|
||||
() -> IdeFocusManager.getGlobalInstance().requestFocus(mySearchTextField, true)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionCallback select(Integer key, boolean now) {
|
||||
return super.select(key, now); // TODO: Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JComponent create(Integer key) {
|
||||
if (key == 0) {
|
||||
@@ -100,10 +93,16 @@ public abstract class PluginsTab {
|
||||
listPanel.add(mySearchTextField, BorderLayout.NORTH);
|
||||
listPanel.add(myCardPanel);
|
||||
|
||||
OnePixelSplitter splitter = new OnePixelSplitter();
|
||||
OnePixelSplitter splitter = new OnePixelSplitter(false, 0.45f) {
|
||||
@Override
|
||||
protected Divider createDivider() {
|
||||
Divider divider = super.createDivider();
|
||||
divider.setBackground(PluginManagerConfigurableNew.SEARCH_FIELD_BORDER_COLOR);
|
||||
return divider;
|
||||
}
|
||||
};
|
||||
splitter.setFirstComponent(listPanel);
|
||||
splitter.setSecondComponent(myDetailsPage = createDetailsPanel(mySearchListener));
|
||||
splitter.setProportion(0.45f);
|
||||
|
||||
mySearchPanel = createSearchPanel(mySelectionListener, mySearchTextField);
|
||||
|
||||
|
||||
+3
-2
@@ -118,8 +118,9 @@ public abstract class TextFieldWithPopupHandlerUI extends BasicTextFieldUI imple
|
||||
|
||||
private void updateIconsLayout(Rectangle bounds) {
|
||||
JTextComponent c = getComponent();
|
||||
Insets margin = UIUtil.getParentOfType(JComboBox.class, c) != null || UIUtil.getParentOfType(JSpinner.class, c) != null ?
|
||||
JBUI.emptyInsets() : getDefaultMargins();
|
||||
Insets margin = UIUtil.getParentOfType(JComboBox.class, c) != null ||
|
||||
UIUtil.getParentOfType(JSpinner.class, c) != null ||
|
||||
UIUtil.isClientPropertyTrue(c, "TextFieldWithoutMargins") ? JBUI.emptyInsets() : getDefaultMargins();
|
||||
|
||||
JBInsets.removeFrom(bounds, c.getInsets());
|
||||
JBInsets.removeFrom(bounds, margin);
|
||||
|
||||
Reference in New Issue
Block a user