active panel indicator moved
This commit is contained in:
parent
0ac0f0a8c7
commit
357aea509a
@ -499,6 +499,22 @@ public class FilePanel extends JPanel {
|
||||
updateTabStyles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the active state of this panel to show/hide the focus indicator strip.
|
||||
* The indicator is placed between the drive dropdown and the tabs.
|
||||
*/
|
||||
public void setActive(boolean active, Color activeColor) {
|
||||
// Inactive indicator is subtle dark gray
|
||||
Color inactiveColor = new Color(60, 60, 60);
|
||||
Color targetColor = active ? activeColor : inactiveColor;
|
||||
|
||||
// Apply a matte border to the top of tabbedPane - this places it between
|
||||
// the topPanel (dropdown) and the tabs themselves.
|
||||
tabbedPane.setBorder(BorderFactory.createMatteBorder(3, 0, 0, 0, targetColor));
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates tab style - highlights the active tab with bold font and color.
|
||||
*/
|
||||
|
||||
@ -960,17 +960,9 @@ public class MainWindow extends JFrame {
|
||||
Color selColor = config.getSelectionColor();
|
||||
if (selColor == null) selColor = new Color(184, 207, 229);
|
||||
|
||||
// Inactive indicator is more subtle (darker)
|
||||
Color inactiveColor = new Color(60, 60, 60);
|
||||
|
||||
// We use a MatteBorder to create a "strip" only on the top edge
|
||||
leftPanel.setBorder(BorderFactory.createCompoundBorder(
|
||||
BorderFactory.createMatteBorder(3, 0, 0, 0, activePanel == leftPanel ? selColor : inactiveColor),
|
||||
BorderFactory.createEmptyBorder(3, 5, 5, 5)));
|
||||
|
||||
rightPanel.setBorder(BorderFactory.createCompoundBorder(
|
||||
BorderFactory.createMatteBorder(3, 0, 0, 0, activePanel == rightPanel ? selColor : inactiveColor),
|
||||
BorderFactory.createEmptyBorder(3, 5, 5, 5)));
|
||||
// Delegate active state visualization to the panels themselves
|
||||
leftPanel.setActive(activePanel == leftPanel, selColor);
|
||||
rightPanel.setActive(activePanel == rightPanel, selColor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user