mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-169940 Get rid of gradient popup titles
* title size and insets are changed
This commit is contained in:
@@ -48,7 +48,7 @@ public class TitlePanel extends CaptionPanel {
|
||||
myLabel.setForeground(JBColor.foreground());
|
||||
myLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
myLabel.setVerticalAlignment(SwingConstants.CENTER);
|
||||
myLabel.setBorder(JBUI.Borders.empty(1, 2, 2, 2));
|
||||
myLabel.setBorder(JBUI.Borders.empty(1, 10, 2, 10));
|
||||
|
||||
add(myLabel, BorderLayout.CENTER);
|
||||
|
||||
@@ -80,6 +80,7 @@ public class TitlePanel extends CaptionPanel {
|
||||
}
|
||||
|
||||
final Dimension preferredSize = super.getPreferredSize();
|
||||
preferredSize.height = JBUI.CurrentTheme.Popup.headerHeight();
|
||||
int maxWidth = JBUI.scale(350);
|
||||
if (!myHtml && preferredSize.width > maxWidth) { // do not allow caption to extend parent container
|
||||
return new Dimension(maxWidth, preferredSize.height);
|
||||
|
||||
@@ -1536,6 +1536,10 @@ public class JBUI {
|
||||
: getColor("Popup.Header.inactiveBackground", 0xededed);
|
||||
}
|
||||
|
||||
public static int headerHeight() {
|
||||
return scale(24);
|
||||
}
|
||||
|
||||
public static Color borderColor(boolean active) {
|
||||
return active
|
||||
? getColor("Popup.Border.color", 0x808080)
|
||||
|
||||
Reference in New Issue
Block a user