Commit 6795cd2f authored by Gregory.Shrago's avatar Gregory.Shrago Committed by intellij-monorepo-bot
Browse files

introduce `actionSystem.popup/toolbar.progress.icon.delay` properties

GitOrigin-RevId: c9209c4f825005f0af97f396e7f206382a656680
parent 504b246f
Showing with 12 additions and 6 deletions
+12 -6
......@@ -18,6 +18,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.ui.popup.*;
import com.intellij.openapi.ui.popup.util.PopupUtil;
import com.intellij.openapi.util.*;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowAnchor;
......@@ -1224,7 +1225,8 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar, QuickAct
ActionPlaces.TOOLWINDOW_TITLE.equals(myPlace) ||
ActionPlaces.WELCOME_SCREEN.equals(myPlace);
if (!suppressLoading) {
EdtScheduledExecutorService.getInstance().schedule(() -> label.setIcon(icon), 500, TimeUnit.MILLISECONDS);
EdtScheduledExecutorService.getInstance().schedule(
() -> label.setIcon(icon), Registry.intValue("actionSystem.toolbar.progress.icon.delay", 500), TimeUnit.MILLISECONDS);
}
}
myForcedUpdateRequested = true;
......
......@@ -204,7 +204,7 @@ public final class Utils {
@NotNull ActionGroup group,
boolean hideDisabled,
@Nullable Consumer<String> missedKeys) {
int maxTime = Registry.intValue("actionSystem.update.actions.async.fast.timeout.ms", 20);
int maxTime = Registry.intValue("actionSystem.update.actions.async.fast-track.timeout.ms", 20);
if (maxTime < 1) return null;
BlockingQueue<Runnable> queue = new LinkedBlockingQueue<>();
ActionUpdater fastUpdater = ActionUpdater.getActionUpdater(updater.asFastUpdateSession(missedKeys, queue::offer));
......@@ -264,7 +264,7 @@ public final class Utils {
EdtScheduledExecutorService.getInstance().schedule(() -> {
if (!icon.isVisible()) return;
glassPane.add(icon);
}, 500, TimeUnit.MILLISECONDS);
}, Registry.intValue("actionSystem.popup.progress.icon.delay", 500), TimeUnit.MILLISECONDS);
return () -> {
if (icon.getParent() != null) glassPane.remove(icon);
else icon.setVisible(false);
......
......@@ -2287,7 +2287,7 @@ final class EditorGutterComponentImpl extends EditorGutterComponentEx implements
clickInfo.myProgressVisualLine = info.visualLine;
clickInfo.myProgressGutterMark = info.renderer;
repaint();
}, 500, TimeUnit.MILLISECONDS);
}, Registry.intValue("actionSystem.popup.progress.icon.delay", 500), TimeUnit.MILLISECONDS);
myLastActionableClick.myProgressRemover = () -> {
removed[0] = true;
if (myLastActionableClick == clickInfo) {
......
......@@ -34,13 +34,17 @@ actionSystem.update.actions.async=true
actionSystem.update.actions.async.description=Whether to "update" actions on background thread where possible
actionSystem.update.actions.async.ui=true
actionSystem.update.actions.async.ui.description=Whether to pump EDT events during actions "update"
actionSystem.update.actions.async.fast.timeout.ms=20
actionSystem.update.actions.async.fast.timeout.ms.description=A timeout in milliseconds for EDT to wait for actions to update using the fast-track. \
actionSystem.update.actions.async.fast-track.timeout.ms=20
actionSystem.update.actions.async.fast-track.timeout.ms.description=A timeout in milliseconds for EDT to wait for actions to update using the fast-track. \
On the fast-track actions are still updated in background but without any slow processing.
actionSystem.update.actions.async.test.delay=0
actionSystem.update.actions.async.test.delay.description=An artificial delay in milliseconds to simulate slow actions in menus, popups, and toolbars
actionSystem.update.touchbar.timeout.ms=100
actionSystem.update.touchbar.timeout.ms.description=Timeout in milliseconds for spending on waiting for touchbar actions' "update" on UI thread
actionSystem.popup.progress.icon.delay=300
actionSystem.popup.progress.icon.delay.description=The delay in milliseconds before a progress icon is shown for popups.
actionSystem.toolbar.progress.icon.delay=500
actionSystem.toolbar.progress.icon.delay.description=The delay in milliseconds before a progress icon is shown for toolbars.
actionSystem.win.suppressAlt.new=true
actionSystem.win.suppressAlt.new.description=Enables another approach to consume Alt which may move focus to main menu (Windows L&F only).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment