Merge remote-tracking branch 'origin/master'

This commit is contained in:
Liana Bakradze
2014-10-22 15:15:31 +04:00
12 changed files with 69 additions and 28 deletions
@@ -0,0 +1 @@
skip: *.gif
Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 226 B

@@ -51,7 +51,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
@@ -228,9 +227,10 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
NonOpaquePanel toolbar = new NonOpaquePanel();
toolbar.setLayout(new BoxLayout(toolbar, BoxLayout.X_AXIS));
toolbar.add(createActionLink("Configure", IdeActions.GROUP_WELCOME_SCREEN_CONFIGURE, AllIcons.General.Settings));
toolbar.add(createActionLink("Get Help", IdeActions.GROUP_WELCOME_SCREEN_DOC, AllIcons.General.Help_small));
toolbar.add(createActionLink("Get Help", IdeActions.GROUP_WELCOME_SCREEN_DOC, null));
JPanel panel = new NonOpaquePanel(new BorderLayout());
panel.add(toolbar, BorderLayout.WEST);
panel.add(toolbar, BorderLayout.EAST);
panel.setBorder(new EmptyBorder(0,0,8,21));
return panel;
}
@@ -248,10 +248,11 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
};
settings.set(new ActionLink(text, icon, action));
settings.get().setPaintUnderline(false);
installFocusable(settings.get(), action, KeyEvent.VK_UP, KeyEvent.VK_DOWN, !Arrays.asList("Get Help", "Register").contains(text));
NonOpaquePanel panel = new NonOpaquePanel();
panel.setBorder(new EmptyBorder(0, 20, 2, 0));
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
panel.setBorder(new EmptyBorder(4, 16, 4, 4));
panel.add(settings.get());
panel.add(new JLabel(AllIcons.General.Combo2), BorderLayout.EAST);
installFocusable(panel, action, KeyEvent.VK_UP, KeyEvent.VK_DOWN, !Arrays.asList("Get Help", "Register").contains(text));
return panel;
}
@@ -270,14 +271,9 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
}
for (AnAction action : group.getChildren(null)) {
JPanel button = new JPanel(new BorderLayout()) {
@Override
public Dimension getPreferredSize() {
return new Dimension(250, super.getPreferredSize().height);
}
};
JPanel button = new JPanel(new BorderLayout());
button.setOpaque(false);
button.setBorder(new EmptyBorder(0, 50, 0, 30));
button.setBorder(new EmptyBorder(8, 20, 8, 20));
Presentation presentation = action.getTemplatePresentation();
action.update(new AnActionEvent(null, DataManager.getInstance().getDataContext(this),
ActionPlaces.WELCOME_SCREEN, presentation, ActionManager.getInstance(), 0));
@@ -285,18 +281,16 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
ActionLink link = new ActionLink(presentation.getText(), presentation.getIcon(), action);
link.setPaintUnderline(false);
link.setNormalColor(new JBColor(Gray._0, Gray.xBB));
link.setBorder(new EmptyBorder(2, 5, 2, 5));
installFocusable(link, action, KeyEvent.VK_UP, KeyEvent.VK_DOWN, true);
installFocusable(button, action, KeyEvent.VK_UP, KeyEvent.VK_DOWN, true);
button.add(link);
actions.add(button);
}
}
actions.setBorder(new EmptyBorder(0, 0, 0, 0));
JPanel panel = new NonOpaquePanel(new BorderLayout());
panel.add(actions, BorderLayout.NORTH);
return panel;
WelcomeScreenActionsPanel panel = new WelcomeScreenActionsPanel();
panel.actions.add(actions);
return panel.root;
}
private void collectAllActions(DefaultActionGroup group, ActionGroup actionGroup) {
@@ -361,8 +355,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
return panel;
}
private void installFocusable(final ActionLink comp, final AnAction action, final int prevKeyCode, final int nextKeyCode, final boolean focusListOnLeft) {
comp.setBorder(new EmptyBorder(6, 2, 6, 2));
private void installFocusable(final JComponent comp, final AnAction action, final int prevKeyCode, final int nextKeyCode, final boolean focusListOnLeft) {
comp.setFocusable(true);
comp.setFocusTraversalKeysEnabled(true);
comp.addKeyListener(new KeyAdapter() {
@@ -388,7 +381,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
} else {
focusPrev(comp);
}
} else if (e.getKeyCode() == KeyEvent.VK_RIGHT && Arrays.asList("Configure", "Get Help").contains(comp.getText())) {
} else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
focusNext(comp);
}
}
@@ -396,12 +389,14 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
comp.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
comp.setBorder(new CompoundBorder(new DottedBorder(new Insets(1, 1, 1, 1), Gray._128), new EmptyBorder(5,1,5,1)));
comp.setOpaque(true);
comp.setBackground(new JBColor(new Color(0xd2e1f0), new Color(0x455565)));
}
@Override
public void focusLost(FocusEvent e) {
comp.setBorder(new EmptyBorder(6, 2, 6, 2));
comp.setOpaque(false);
comp.setBackground(getMainBackground());
}
});
@@ -523,4 +518,9 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
public static void notifyFrameClosed(JFrame frame) {
saveLocation(frame.getBounds());
}
public static class WelcomeScreenActionsPanel {
private JPanel root;
private JPanel actions;
}
}
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame.WelcomeScreenActionsPanel">
<grid id="27dc6" binding="root" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties>
<opaque value="false"/>
</properties>
<border type="none"/>
<children>
<grid id="24eb0" binding="actions" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<opaque value="false"/>
</properties>
<border type="none"/>
<children/>
</grid>
<vspacer id="81d5f">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<hspacer id="1f1b5">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<hspacer id="97ba3">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
</form>
@@ -1169,10 +1169,10 @@ public class AllIcons {
public static class Welcome {
public static final Icon CreateDesktopEntry = IconLoader.getIcon("/welcome/createDesktopEntry.png"); // 32x32
public static final Icon CreateNewProject = IconLoader.getIcon("/welcome/createNewProject.png"); // 32x32
public static final Icon FromVCS = IconLoader.getIcon("/welcome/fromVCS.png"); // 32x32
public static final Icon ImportProject = IconLoader.getIcon("/welcome/importProject.png"); // 32x32
public static final Icon OpenProject = IconLoader.getIcon("/welcome/openProject.png"); // 32x32
public static final Icon CreateNewProject = IconLoader.getIcon("/welcome/createNewProject.png"); // 16x16
public static final Icon FromVCS = IconLoader.getIcon("/welcome/fromVCS.png"); // 16x16
public static final Icon ImportProject = IconLoader.getIcon("/welcome/importProject.png"); // 16x16
public static final Icon OpenProject = IconLoader.getIcon("/welcome/openProject.png"); // 16x16
public static final Icon Register = IconLoader.getIcon("/welcome/register.png"); // 32x32
}