mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
option to prevent hiding choose by name popups on focus loss (IDEA-61092)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.intellij.ide.util.gotoByName;
|
||||
|
||||
import com.intellij.featureStatistics.FeatureUsageTracker;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.keymap.KeymapUtil;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -95,8 +96,8 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
myShowListForEmptyPattern = showListForEmptyPattern;
|
||||
}
|
||||
|
||||
protected boolean isCloseByFocusLost(){
|
||||
return true;
|
||||
protected boolean isCloseByFocusLost() {
|
||||
return UISettings.getInstance().HIDE_NAVIGATION_ON_FOCUS_LOSS;
|
||||
}
|
||||
|
||||
protected void showList() {
|
||||
|
||||
@@ -89,6 +89,7 @@ public class UISettings implements PersistentStateComponent<UISettings>, Exporta
|
||||
public boolean SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = false;
|
||||
public int MAX_LOOKUP_WIDTH = 500;
|
||||
public int MAX_LOOKUP_LIST_HEIGHT = 11;
|
||||
public boolean HIDE_NAVIGATION_ON_FOCUS_LOSS = true;
|
||||
|
||||
/**
|
||||
* Defines whether asterisk is shown on modified editor tab or not
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.openapi.ui.ComboBox;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
import com.intellij.ui.components.JBCheckBox;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -144,6 +145,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
}
|
||||
settings.OVERRIDE_NONIDEA_LAF_FONTS = myComponent.myOverrideLAFFonts.isSelected();
|
||||
settings.MOVE_MOUSE_ON_DEFAULT_BUTTON = myComponent.myMoveMouseOnDefaultButtonCheckBox.isSelected();
|
||||
settings.HIDE_NAVIGATION_ON_FOCUS_LOSS = myComponent.myHideNavigationPopupsCheckBox.isSelected();
|
||||
|
||||
update |= settings.DISABLE_MNEMONICS != myComponent.myDisableMnemonics.isSelected();
|
||||
settings.DISABLE_MNEMONICS = myComponent.myDisableMnemonics.isSelected();
|
||||
@@ -202,6 +204,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
|
||||
myComponent.myHideIconsInQuickNavigation.setSelected(settings.SHOW_ICONS_IN_QUICK_NAVIGATION);
|
||||
myComponent.myMoveMouseOnDefaultButtonCheckBox.setSelected(settings.MOVE_MOUSE_ON_DEFAULT_BUTTON);
|
||||
myComponent.myHideNavigationPopupsCheckBox.setSelected(settings.HIDE_NAVIGATION_ON_FOCUS_LOSS);
|
||||
myComponent.myLafComboBox.setSelectedItem(LafManager.getInstance().getCurrentLookAndFeel());
|
||||
myComponent.myOverrideLAFFonts.setSelected(settings.OVERRIDE_NONIDEA_LAF_FONTS);
|
||||
myComponent.myDisableMnemonics.setSelected(settings.DISABLE_MNEMONICS);
|
||||
@@ -244,6 +247,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
isModified |= myComponent.myHideIconsInQuickNavigation.isSelected() != settings.SHOW_ICONS_IN_QUICK_NAVIGATION;
|
||||
|
||||
isModified |= myComponent.myMoveMouseOnDefaultButtonCheckBox.isSelected() != settings.MOVE_MOUSE_ON_DEFAULT_BUTTON;
|
||||
isModified |= myComponent.myHideNavigationPopupsCheckBox.isSelected() != settings.HIDE_NAVIGATION_ON_FOCUS_LOSS;
|
||||
isModified |= !Comparing.equal(myComponent.myLafComboBox.getSelectedItem(), LafManager.getInstance().getCurrentLookAndFeel());
|
||||
if (WindowManagerEx.getInstanceEx().isAlphaModeSupported()) {
|
||||
isModified |= myComponent.myEnableAlphaModeCheckBox.isSelected() != settings.ENABLE_ALPHA_MODE;
|
||||
@@ -310,6 +314,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
private JCheckBox myHideIconsInQuickNavigation;
|
||||
private JCheckBox myCbDisplayIconsInMenu;
|
||||
private JCheckBox myDisableMnemonics;
|
||||
private JBCheckBox myHideNavigationPopupsCheckBox;
|
||||
|
||||
public MyComponent() {
|
||||
ActionListener updater = new ActionListener() {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d992b" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="d992b" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="1" fill="3" indent="0" use-parent-layout="false"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
<grid id="4c401" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -77,7 +77,7 @@
|
||||
<grid id="d9fb" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -137,7 +137,7 @@
|
||||
<grid id="ce348" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -169,6 +169,14 @@
|
||||
<text resource-bundle="messages/IdeBundle" key="checkbox.show.icons.in.quick.navigation"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="fdf33" class="com.intellij.ui.components.JBCheckBox" binding="myHideNavigationPopupsCheckBox">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Hide navigation popups on focus loss"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="26e1c" binding="myTransparencyPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
|
||||
Reference in New Issue
Block a user