diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ide/ui')
5 files changed, 17 insertions, 91 deletions
diff --git a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java index cc6e16aba6c2..9accbc5bc6c8 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.java @@ -174,6 +174,9 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab update |= settings.SHOW_EDITOR_TOOLTIP != myComponent.myEditorTooltipCheckBox.isSelected(); settings.SHOW_EDITOR_TOOLTIP = myComponent.myEditorTooltipCheckBox.isSelected(); + update |= settings.NAVIGATE_TO_PREVIEW != myComponent.myNavigateToPreviewCheckBox.isSelected(); + settings.NAVIGATE_TO_PREVIEW = myComponent.myNavigateToPreviewCheckBox.isSelected(); + update |= settings.DISABLE_MNEMONICS_IN_CONTROLS != myComponent.myDisableMnemonicInControlsCheckBox.isSelected(); settings.DISABLE_MNEMONICS_IN_CONTROLS = myComponent.myDisableMnemonicInControlsCheckBox.isSelected(); @@ -280,6 +283,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab myComponent.myLeftLayoutCheckBox.setSelected(settings.LEFT_HORIZONTAL_SPLIT); myComponent.myRightLayoutCheckBox.setSelected(settings.RIGHT_HORIZONTAL_SPLIT); myComponent.myEditorTooltipCheckBox.setSelected(settings.SHOW_EDITOR_TOOLTIP); + myComponent.myNavigateToPreviewCheckBox.setSelected(settings.NAVIGATE_TO_PREVIEW); myComponent.myDisableMnemonicInControlsCheckBox.setSelected(settings.DISABLE_MNEMONICS_IN_CONTROLS); boolean alphaModeEnabled = WindowManagerEx.getInstanceEx().isAlphaModeSupported(); @@ -325,6 +329,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab isModified |= myComponent.myLeftLayoutCheckBox.isSelected() != settings.LEFT_HORIZONTAL_SPLIT; isModified |= myComponent.myRightLayoutCheckBox.isSelected() != settings.RIGHT_HORIZONTAL_SPLIT; isModified |= myComponent.myEditorTooltipCheckBox.isSelected() != settings.SHOW_EDITOR_TOOLTIP; + isModified |= myComponent.myNavigateToPreviewCheckBox.isSelected() != settings.NAVIGATE_TO_PREVIEW; isModified |= myComponent.myHideIconsInQuickNavigation.isSelected() != settings.SHOW_ICONS_IN_QUICK_NAVIGATION; @@ -397,6 +402,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab private JSlider myInitialTooltipDelaySlider; private ComboBox myPresentationModeFontSize; private JCheckBox myEditorTooltipCheckBox; + private JCheckBox myNavigateToPreviewCheckBox; private JCheckBox myAllowStatusBar; private JCheckBox myAllowLineNumbers; private JCheckBox myAllowAnnotations; diff --git a/platform/platform-impl/src/com/intellij/ide/ui/AppearancePanel.form b/platform/platform-impl/src/com/intellij/ide/ui/AppearancePanel.form index 550e8e2482e1..7590feba2ad8 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/AppearancePanel.form +++ b/platform/platform-impl/src/com/intellij/ide/ui/AppearancePanel.form @@ -401,6 +401,14 @@ <text resource-bundle="messages/IdeBundle" key="checkbox.show.editor.preview.popup"/> </properties> </component> + <component id="3e39" class="javax.swing.JCheckBox" binding="myNavigateToPreviewCheckBox" default-binding="true"> + <constraints> + <grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> + </constraints> + <properties> + <text resource-bundle="messages/IdeBundle" key="checkbox.use.preview.window"/> + </properties> + </component> </children> </grid> <grid id="e3cc0" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java index 1036307e97d7..7e00dc3a9841 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java @@ -87,9 +87,8 @@ import java.util.List; */ @State( name = "LafManager", - roamingType = RoamingType.PER_PLATFORM, - storages = {@Storage( - file = StoragePathMacros.APP_CONFIG + "/options.xml")}) + storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/options.xml", roamingType = RoamingType.PER_PLATFORM)} +) public final class LafManagerImpl extends LafManager implements ApplicationComponent, PersistentStateComponent<Element> { private static final Logger LOG = Logger.getInstance("#com.intellij.ide.ui.LafManager"); diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/intellijlaf.properties b/platform/platform-impl/src/com/intellij/ide/ui/laf/intellijlaf.properties index f721abfdb92b..ef0a4214db11 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/intellijlaf.properties +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/intellijlaf.properties @@ -118,6 +118,7 @@ CheckBox.darcula.focused.backgroundColor2.selected=3B98FB ComboBoxUI=com.intellij.ide.ui.laf.darcula.ui.DarculaComboBoxUI ComboBox.disabledBackground=e8e8e8 +ComboBox.disabledForeground=777777 ComboBox.squareButton=false ComboBox.darcula.arrowFillColor=6e9bd5 ComboBox.darcula.arrowFocusedFillColor=2d82ed diff --git a/platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java b/platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java index 8febc9ad392a..a0df30abae1c 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java @@ -41,8 +41,6 @@ import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.*; @@ -314,18 +312,6 @@ public class SearchUtil { } } - public static Runnable lightOptions(final SearchableConfigurable configurable, - final JComponent component, - final String option, - final GlassPanel glassPanel, - final boolean forceSelect) { - return new Runnable() { - public void run() { - traverseComponentsTree(configurable, glassPanel, component, option, forceSelect); - } - }; - } - public static String markup(@NonNls @NotNull String textToMarkup, @Nullable String filter) { if (filter == null || filter.length() == 0) { return textToMarkup; @@ -575,80 +561,6 @@ public class SearchUtil { return null; } - public static void showHintPopup(final ConfigurableSearchTextField searchField, - final JBPopup[] activePopup, - final Alarm showHintAlarm, - final Consumer<String> selectConfigurable, - final Project project) { - for (JBPopup aPopup : activePopup) { - if (aPopup != null) { - aPopup.cancel(); - } - } - - final JBPopup popup = createPopup(searchField, activePopup, showHintAlarm, selectConfigurable, project, 0); //no selection - if (popup != null) { - popup.showUnderneathOf(searchField); - searchField.requestFocusInWindow(); - } - - activePopup[0] = popup; - activePopup[1] = null; - } - - - public static void registerKeyboardNavigation(final ConfigurableSearchTextField searchField, - final JBPopup[] activePopup, - final Alarm showHintAlarm, - final Consumer<String> selectConfigurable, - final Project project) { - final Consumer<Integer> shower = new Consumer<Integer>() { - public void consume(final Integer direction) { - if (activePopup[0] != null) { - activePopup[0].cancel(); - } - - if (activePopup[1] != null && activePopup[1].isVisible()) { - return; - } - - final JBPopup popup = createPopup(searchField, activePopup, showHintAlarm, selectConfigurable, project, direction.intValue()); - if (popup != null) { - popup.showUnderneathOf(searchField); - } - activePopup[0] = null; - activePopup[1] = popup; - } - }; - searchField.registerKeyboardAction(new ActionListener() { - public void actionPerformed(ActionEvent e) { - shower.consume(1); - } - }, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); - searchField.registerKeyboardAction(new ActionListener() { - public void actionPerformed(ActionEvent e) { - shower.consume(-1); - } - }, KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); - - searchField.addKeyboardListener(new KeyAdapter() { - public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_ESCAPE && searchField.getText().length() > 0) { - e.consume(); - if (cancelPopups(activePopup)) return; - searchField.setText(""); - } - else if (e.getKeyCode() == KeyEvent.VK_ENTER) { - searchField.addCurrentTextToHistory(); - cancelPopups(activePopup); - if (e.getModifiers() == 0) { - e.consume(); - } - } - } - }); - } - private static boolean cancelPopups(final JBPopup[] activePopup) { for (JBPopup popup : activePopup) { if (popup != null && popup.isVisible()) { |