mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use engraved separator for new project settings
This commit is contained in:
+14
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,8 +16,11 @@
|
||||
package com.intellij.ui.popup.list;
|
||||
|
||||
import com.intellij.openapi.ui.popup.ListItemDescriptor;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.EngravedLabel;
|
||||
import com.intellij.ui.ErrorLabel;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.GroupedElementsRenderer;
|
||||
import com.intellij.ui.components.panels.OpaquePanel;
|
||||
|
||||
@@ -55,15 +58,21 @@ public class GroupedItemsListRenderer extends GroupedElementsRenderer.List imple
|
||||
|
||||
@Override
|
||||
protected JComponent createItemComponent() {
|
||||
myTextLabel = new ErrorLabel();
|
||||
myTextLabel.setOpaque(true);
|
||||
myTextLabel.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
|
||||
if (Registry.is("ide.new.project.settings")) {
|
||||
myTextLabel = new EngravedLabel();
|
||||
myTextLabel.setFont(myTextLabel.getFont().deriveFont(Font.BOLD));
|
||||
myTextLabel.setForeground(Gray._240);
|
||||
} else {
|
||||
myTextLabel = new ErrorLabel();
|
||||
myTextLabel.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
|
||||
}
|
||||
|
||||
myTextLabel.setOpaque(true);
|
||||
return layoutComponent(myTextLabel);
|
||||
}
|
||||
|
||||
protected final JComponent layoutComponent(JComponent middleItemComponent) {
|
||||
JPanel result = new OpaquePanel(new BorderLayout(4, 4), Color.white);
|
||||
JPanel result = new OpaquePanel(Registry.is("ide.new.project.settings") ? new BorderLayout(0, 0) : new BorderLayout(4, 4), Color.white);
|
||||
|
||||
myNextStepLabel = new JLabel();
|
||||
myNextStepLabel.setOpaque(true);
|
||||
|
||||
Reference in New Issue
Block a user