Файли
openidea/src/features/python-packages/index.ts
T
l0ng-ai 7fd5ad50b8 fix(ui): unify tool window icons as monochrome and fix dark-mode icon contrast (#7842)
Tool windows that borrowed coloured file, status, action or vendor icons (Documentation, Find Usages, GitHub Actions, Logcat, Python Console, NuGet, Python Packages, Jupyter Variables, Ports, the Flutter DevTools windows, Coverage) get dedicated monochrome icons at 16 and 20 px; the coloured originals stay where trees, badges and VCS use them. Database Consoles and Query Workspace get a console icon instead of the table grid, and data source entries use the database cylinder.

Icons in the project view, trees, tabs, menus and several popups take --fg-icon instead of --fg-muted / --fg-subtle, so monochrome icons have the same contrast in dark themes.
2026-12-04 01:52:52 +08:00

32 рядки
1.0 KiB
TypeScript

/** Python Packages: the project interpreter's packages, with PyPI lookup, in a tool window. */
import { registerActions } from "@/platform/actions";
import { lazyComponent } from "@/ui";
import { registerToolWindow, toolWindowService } from "@/workbench/contributions";
const ID = "pythonPackages";
export function activate(): () => void {
const disposers = [
registerToolWindow({
id: ID,
title: "Python Packages",
icon: "toolwindow-python-packages",
anchor: "bottom",
// Listed under the stripe's "…" until first opened: most projects are not Python ones.
stripe: "onUse",
order: 28,
component: lazyComponent(() => import("./PackagesView").then((m) => m.PackagesView)),
}),
registerActions([
{
id: "python.packages.show",
title: "Python Packages",
category: "Tools",
when: "projectOpen",
run: () => toolWindowService().show(ID, true),
},
]),
];
return () => disposers.reverse().forEach((d) => d());
}