Skip to content

Commit

Permalink
Respect value of "ide.instant.theme.switch.delay"
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Apr 16, 2020
1 parent 283a9ca commit 45842e0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.intellij.openapi.Disposable;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.util.Alarm;

import javax.swing.*;
Expand Down Expand Up @@ -69,7 +70,8 @@ private UIManager.LookAndFeelInfo getTargetLaf(final boolean dark, final boolean
private void updateLaf(final UIManager.LookAndFeelInfo targetLaf) {
alarm.cancelAllRequests();
alarm.addRequest(
() -> QuickChangeLookAndFeel.switchLafAndUpdateUI(LafManager.getInstance(), targetLaf, false), 0);
() -> QuickChangeLookAndFeel.switchLafAndUpdateUI(LafManager.getInstance(), targetLaf, false),
Registry.get("ide.instant.theme.switch.delay").asInteger());
}

@Override
Expand Down

0 comments on commit 45842e0

Please sign in to comment.