mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-85375 Run configurations dropbox should not change its width
Limit minimum width for Run Configurations combobox
This commit is contained in:
+8
-1
@@ -122,7 +122,14 @@ public class RunConfigurationsComboBoxAction extends ComboBoxAction implements D
|
||||
|
||||
@Override
|
||||
public JComponent createCustomComponent(final Presentation presentation) {
|
||||
ComboBoxButton button = createComboBoxButton(presentation);
|
||||
ComboBoxButton button = new ComboBoxButton(presentation) {
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
Dimension d = super.getPreferredSize();
|
||||
d.width = Math.max(d.width, JBUI.scale(75));
|
||||
return d;
|
||||
}
|
||||
};
|
||||
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
|
||||
panel.setBorder(JBUI.Borders.emptyRight(2));
|
||||
panel.add(button);
|
||||
|
||||
@@ -484,9 +484,7 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
boolean isEmpty = getIcon() == null && StringUtil.isEmpty(getText());
|
||||
|
||||
int x = size.width - icon.getIconWidth();
|
||||
if (isEmpty) {
|
||||
x /= 2;
|
||||
} else {
|
||||
if (!isEmpty) {
|
||||
if (UIUtil.isUnderWin10LookAndFeel()) {
|
||||
x -= JBUI.scale(6);
|
||||
x -= JBUI.scale(UIUtil.getParentOfType(ActionToolbar.class, this) != null ? 2 : 0);
|
||||
|
||||
Reference in New Issue
Block a user