mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Support custom background for popup title
GitOrigin-RevId: 6b46f47e59d47da0928fb681bb76693d9703e46d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
50fe9f538b
commit
dd603b4a8c
@@ -64,6 +64,7 @@ public class BranchActionGroupPopup extends FlatSpeedSearchPopup {
|
||||
@Nullable String dimensionKey) {
|
||||
super(title, createBranchSpeedSearchActionGroup(actions), SimpleDataContext.getProjectContext(project),
|
||||
preselectActionCondition, true);
|
||||
getTitle().setBackground(JBColor.PanelBackground);
|
||||
myProject = project;
|
||||
DataManager.registerDataProvider(getList(), dataId -> POPUP_MODEL.is(dataId) ? getListModel() : null);
|
||||
myKey = dimensionKey;
|
||||
|
||||
@@ -24,6 +24,7 @@ public class CaptionPanel extends JPanel {
|
||||
|
||||
public CaptionPanel() {
|
||||
setLayout(new BorderLayout());
|
||||
setBackground(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,8 +32,11 @@ public class CaptionPanel extends JPanel {
|
||||
super.paintComponent(g);
|
||||
|
||||
Graphics2D g2d = (Graphics2D) g;
|
||||
|
||||
g2d.setPaint(JBUI.CurrentTheme.Popup.headerBackground(myActive));
|
||||
Color background = getBackground();
|
||||
if (background == null) {
|
||||
background = JBUI.CurrentTheme.Popup.headerBackground(myActive);
|
||||
}
|
||||
g2d.setColor(background);
|
||||
g2d.fillRect(0, 0, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user