mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Support of composite editors for comboboxes
This commit is contained in:
@@ -17,6 +17,7 @@ package com.intellij.ide.ui.laf.darcula.ui;
|
||||
|
||||
import com.intellij.ide.ui.laf.darcula.DarculaUIUtil;
|
||||
import com.intellij.openapi.ui.GraphicsConfig;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.util.ui.JBInsets;
|
||||
@@ -419,4 +420,18 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border {
|
||||
public boolean isBorderOpaque() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureEditor() {
|
||||
super.configureEditor();
|
||||
if (Registry.is("ide.ui.composite.editor.for.combobox")) {
|
||||
// BasicComboboxUI sets focusability depending on the combobox focusability.
|
||||
// JPanel usually is unfocusable and uneditable.
|
||||
// It could be set as an editor when people want to have a composite component as an editor.
|
||||
// In such cases we should restore unfocusable state for panels.
|
||||
if (editor instanceof JPanel) {
|
||||
editor.setFocusable(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -857,4 +857,5 @@ low.memory.watcher.sync.description=Whether LowMemoryWatcher runnables should be
|
||||
typing.freeze.report.dumps=false
|
||||
typing.freeze.report.dumps.description=Automatically reports thread dumps to our statistics server
|
||||
|
||||
store.basedir.parent.detection=true
|
||||
store.basedir.parent.detection=true
|
||||
ide.ui.composite.editor.for.combobox=false
|
||||
Reference in New Issue
Block a user