Merge branch 'IDEA-190919'

This commit is contained in:
Mikhail Sokolov
2018-04-25 14:31:45 +03:00
3 changed files with 7 additions and 3 deletions
@@ -99,4 +99,8 @@ public class CaptionPanel extends JPanel {
public static Color getBorderColor(boolean isActive) {
return JBUI.CurrentTheme.Popup.borderColor(isActive);
}
protected boolean containsSettingsControls() {
return mySettingComponent != null;
}
}
@@ -80,7 +80,7 @@ public class TitlePanel extends CaptionPanel {
}
final Dimension preferredSize = super.getPreferredSize();
preferredSize.height = JBUI.CurrentTheme.Popup.headerHeight();
preferredSize.height = JBUI.CurrentTheme.Popup.headerHeight(containsSettingsControls());
int maxWidth = JBUI.scale(350);
if (!myHtml && preferredSize.width > maxWidth) { // do not allow caption to extend parent container
return new Dimension(maxWidth, preferredSize.height);
@@ -1528,8 +1528,8 @@ public class JBUI {
: JBColor.namedColor("Popup.Header.inactiveBackground", 0xededed);
}
public static int headerHeight() {
return scale(24);
public static int headerHeight(boolean hasControls) {
return hasControls ? scale(28) : scale(24);
}
public static Color borderColor(boolean active) {