mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-107274 Editor tabs in vertical mode: show only invisible items in popup
This commit is contained in:
@@ -557,18 +557,10 @@ public class JBTabsImpl extends JComponent
|
||||
return;
|
||||
}
|
||||
mySingleRowLayout.myMorePopup = new JBPopupMenu();
|
||||
float grayPercent = 0.9f;
|
||||
for (final TabInfo each : myVisibleInfos) {
|
||||
if (!mySingleRowLayout.isTabHidden(each)) continue;
|
||||
final JMenuItem item = new JBCheckboxMenuItem(each.getText(), getSelectedInfo() == each);
|
||||
item.setIcon(each.getIcon());
|
||||
Color color = UIManager.getColor("MenuItem.background");
|
||||
if (color != null) {
|
||||
if (mySingleRowLayout.isTabHidden(each)) {
|
||||
color = new Color((int) (color.getRed() * grayPercent), (int) (color.getGreen() * grayPercent), (int) (color.getBlue() * grayPercent));
|
||||
}
|
||||
item.setBackground(color);
|
||||
}
|
||||
|
||||
mySingleRowLayout.myMorePopup.add(item);
|
||||
item.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user