mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
combobox button does not restore font and size settings
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -284,9 +284,10 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
if (!UIUtil.isUnderGTKLookAndFeel()) {
|
||||
setBorder(UIUtil.getButtonBorder());
|
||||
}
|
||||
//if (!UIUtil.isUnderGTKLookAndFeel()) {
|
||||
// setBorder(UIUtil.getButtonBorder());
|
||||
//}
|
||||
//((JComponent)getParent().getParent()).revalidate();
|
||||
}
|
||||
|
||||
protected class MyButtonModel extends DefaultButtonModel {
|
||||
@@ -358,6 +359,11 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
return new Dimension(width, isSmallVariant() ? 19 : UIUtil.isUnderNimbusLookAndFeel() ? 24 : 21);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Font getFont() {
|
||||
return SystemInfo.isMac ? UIUtil.getLabelFont(UIUtil.FontSize.SMALL) : UIUtil.getLabelFont();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Graphics g) {
|
||||
GraphicsUtil.setupAntialiasing(g);
|
||||
@@ -440,6 +446,7 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
protected void updateButtonSize() {
|
||||
invalidate();
|
||||
repaint();
|
||||
setSize(getPreferredSize());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user