Skip to content

Commit

Permalink
remove change background action (hide by registry key)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: c9f289a2986144e94386afe45e8bd94a62ab9269
  • Loading branch information
bulenkov authored and intellij-monorepo-bot committed May 19, 2020
1 parent 04164ab commit 3132bb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions images/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<registryKey key="ide.images.show.grid" defaultValue="false"/>
<registryKey key="ide.images.show.grid.only.when.zoom.factor.equal.or.more.than" defaultValue="3"/>
<registryKey key="ide.images.show.grid.after.every.x.pixels" defaultValue="1"/>
<registryKey key="ide.images.change.background.action.enabled" defaultValue="false"/>
</extensions>

<actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.ui.GraphicsConfig;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.ui.ColorPicker;
import com.intellij.ui.ColorUtil;
import com.intellij.ui.Gray;
Expand Down Expand Up @@ -43,6 +44,11 @@ public void colorChanged(Color color, Object source) {
}
}

@Override
public void update(@NotNull AnActionEvent e) {
e.getPresentation().setEnabledAndVisible(Registry.is("ide.images.change.background.action.enabled", false));
}

private static class MyBackgroundIcon implements Icon {
Color color = JBColor.background();

Expand Down

0 comments on commit 3132bb9

Please sign in to comment.