mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update selection bg for new welcome screen
This commit is contained in:
+15
-3
@@ -91,6 +91,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
} else {
|
||||
setSize(555, 460);
|
||||
}
|
||||
setResizable(false);
|
||||
//int x = bounds.x + (bounds.width - getWidth()) / 2;
|
||||
//int y = bounds.y + (bounds.height - getHeight()) / 2;
|
||||
Point location = DimensionService.getInstance().getLocation(WelcomeFrame.DIMENSION_KEY, null);
|
||||
@@ -176,8 +177,8 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
return new JBColor(Gray._0, Gray.xBB);
|
||||
}
|
||||
|
||||
public static Color getListSelectionColor() {
|
||||
return new JBColor(0x3875d6, 0x4b6eaf);
|
||||
public static Color getListSelectionColor(boolean hasFocus) {
|
||||
return hasFocus ? new JBColor(0x3875d6, 0x4b6eaf) : new JBColor(Gray.xDD, Gray.x45);
|
||||
}
|
||||
|
||||
public static Color getActionLinkSelectionColor() {
|
||||
@@ -185,7 +186,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
}
|
||||
|
||||
public static JBColor getSeparatorColor() {
|
||||
return new JBColor(Gray.xEC, new Color(0x4e5154));
|
||||
return new JBColor(Gray.xEC, new Color(72, 75, 78));
|
||||
}
|
||||
|
||||
private class FlatWelcomeScreen extends JPanel implements WelcomeScreen {
|
||||
@@ -220,6 +221,17 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
removeIfNeeded();
|
||||
}
|
||||
});
|
||||
projectsList.addFocusListener(new FocusListener() {
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
projectsList.repaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
projectsList.repaint();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
add(createBody(), BorderLayout.CENTER);
|
||||
|
||||
+2
-2
@@ -87,12 +87,12 @@ public class NewRecentProjectPanel extends RecentProjectPanel {
|
||||
}
|
||||
@Override
|
||||
protected Color getListBackground(boolean isSelected, boolean hasFocus) {
|
||||
return isSelected ? FlatWelcomeFrame.getListSelectionColor() : FlatWelcomeFrame.getProjectsBackground();
|
||||
return isSelected ? FlatWelcomeFrame.getListSelectionColor(hasFocus) : FlatWelcomeFrame.getProjectsBackground();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Color getListForeground(boolean isSelected, boolean hasFocus) {
|
||||
return UIUtil.getListForeground(isSelected);
|
||||
return UIUtil.getListForeground(isSelected && hasFocus);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+2
-2
@@ -257,8 +257,8 @@ public class RecentProjectPanel extends JPanel {
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
ReopenProjectAction item = (ReopenProjectAction)value;
|
||||
|
||||
Color fore = getListForeground(isSelected, cellHasFocus);
|
||||
Color back = getListBackground(isSelected, cellHasFocus);
|
||||
Color fore = getListForeground(isSelected, list.hasFocus());
|
||||
Color back = getListBackground(isSelected, list.hasFocus());
|
||||
|
||||
myName.setForeground(fore);
|
||||
myPath.setForeground(isSelected ? fore : UIUtil.getInactiveTextColor());
|
||||
|
||||
Reference in New Issue
Block a user