diff --git a/python/ide/impl/BUILD.bazel b/python/ide/impl/BUILD.bazel index e2d7a957df3e..858a713e0993 100644 --- a/python/ide/impl/BUILD.bazel +++ b/python/ide/impl/BUILD.bazel @@ -11,9 +11,10 @@ jvm_library( name = "impl", module_name = "intellij.pycharm.community.ide.impl", visibility = ["//visibility:public"], - srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True), + srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form", "gen/**/*.kt", "gen/**/*.java"], allow_empty = True), deps = [ "//platform/analysis-api:analysis", + "//platform/compose", "//platform/code-style-api:codeStyle", "//platform/core-api:core", "//platform/editor-ui-api:editor-ui", @@ -54,11 +55,13 @@ jvm_library( "//python/python-hatch:hatch", "@lib//:io-github-z4kn4fein-semver-jvm", "@lib//:tuweni-toml-provided", + "//platform/non-modal-welcome-screen", ], runtime_deps = [ ":impl_resources", "//python/python-features-trainer:featuresTrainer", - ] + ], + plugins = ["@lib//:compose-plugin"] ) jvm_library( @@ -68,6 +71,7 @@ jvm_library( associates = [":impl"], deps = [ "//platform/analysis-api:analysis", + "//platform/compose", "//platform/code-style-api:codeStyle", "//platform/core-api:core", "//platform/editor-ui-api:editor-ui", @@ -119,8 +123,10 @@ jvm_library( "@lib//:junit5", "@lib//:io-github-z4kn4fein-semver-jvm", "@lib//:tuweni-toml-provided", + "//platform/non-modal-welcome-screen", ], - runtime_deps = [":impl_resources"] + runtime_deps = [":impl_resources"], + plugins = ["@lib//:compose-plugin"] ) ### auto-generated section `build intellij.pycharm.community.ide.impl` end diff --git a/python/ide/impl/gen/com/intellij/pycharm/community/ide/impl/PycharmCommunityIdeImplIcons.java b/python/ide/impl/gen/com/intellij/pycharm/community/ide/impl/PycharmCommunityIdeImplIcons.java new file mode 100644 index 000000000000..5dc4c45f7b5b --- /dev/null +++ b/python/ide/impl/gen/com/intellij/pycharm/community/ide/impl/PycharmCommunityIdeImplIcons.java @@ -0,0 +1,23 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl; + +import com.intellij.ui.IconManager; +import org.jetbrains.annotations.NotNull; + +import javax.swing.*; + +/** + * NOTE THIS FILE IS AUTO-GENERATED + * DO NOT EDIT IT BY HAND, run "Generate icon classes" configuration instead + */ +@org.jetbrains.annotations.ApiStatus.Internal +public final class PycharmCommunityIdeImplIcons { + private static @NotNull Icon load(@NotNull String path, int cacheKey, int flags) { + return IconManager.getInstance().loadRasterizedIcon(path, PycharmCommunityIdeImplIcons.class.getClassLoader(), cacheKey, flags); + } + /** 24x24 */ public static final @NotNull Icon ImportFile = load("icons/importFile.svg", -2037408220, 2); + /** 24x24 */ public static final @NotNull Icon Junie = load("icons/junie.svg", 1266626381, 2); + /** 24x24 */ public static final @NotNull Icon JupyterNotebook = load("icons/jupyterNotebook.svg", 1280505602, 2); + /** 24x24 */ public static final @NotNull Icon Learn = load("icons/learn.svg", -78177221, 2); + /** 24x24 */ public static final @NotNull Icon PythonFile = load("icons/pythonFile.svg", 147678377, 2); +} diff --git a/python/ide/impl/intellij.pycharm.community.ide.impl.iml b/python/ide/impl/intellij.pycharm.community.ide.impl.iml index b6025dfa8f2e..f84806e30fca 100644 --- a/python/ide/impl/intellij.pycharm.community.ide.impl.iml +++ b/python/ide/impl/intellij.pycharm.community.ide.impl.iml @@ -1,15 +1,38 @@ + + + + + + + + + + + + + + $MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compose-compiler-plugin/2.2.20/kotlin-compose-compiler-plugin-2.2.20.jar + + + + + + + + @@ -53,5 +76,6 @@ + \ No newline at end of file diff --git a/python/ide/impl/resources/icons/importFile.svg b/python/ide/impl/resources/icons/importFile.svg new file mode 100644 index 000000000000..ef745a39363f --- /dev/null +++ b/python/ide/impl/resources/icons/importFile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/importFile_dark.svg b/python/ide/impl/resources/icons/importFile_dark.svg new file mode 100644 index 000000000000..a23690538f05 --- /dev/null +++ b/python/ide/impl/resources/icons/importFile_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/junie.svg b/python/ide/impl/resources/icons/junie.svg new file mode 100644 index 000000000000..3fb020129631 --- /dev/null +++ b/python/ide/impl/resources/icons/junie.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/python/ide/impl/resources/icons/junie_dark.svg b/python/ide/impl/resources/icons/junie_dark.svg new file mode 100644 index 000000000000..3fb020129631 --- /dev/null +++ b/python/ide/impl/resources/icons/junie_dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/python/ide/impl/resources/icons/jupyterNotebook.svg b/python/ide/impl/resources/icons/jupyterNotebook.svg new file mode 100644 index 000000000000..4d8b6499aa05 --- /dev/null +++ b/python/ide/impl/resources/icons/jupyterNotebook.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/jupyterNotebook_dark.svg b/python/ide/impl/resources/icons/jupyterNotebook_dark.svg new file mode 100644 index 000000000000..23db3efef238 --- /dev/null +++ b/python/ide/impl/resources/icons/jupyterNotebook_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/learn.svg b/python/ide/impl/resources/icons/learn.svg new file mode 100644 index 000000000000..f285f64ee04d --- /dev/null +++ b/python/ide/impl/resources/icons/learn.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/learn_dark.svg b/python/ide/impl/resources/icons/learn_dark.svg new file mode 100644 index 000000000000..6f33d4bbfbc2 --- /dev/null +++ b/python/ide/impl/resources/icons/learn_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/pythonFile.svg b/python/ide/impl/resources/icons/pythonFile.svg new file mode 100644 index 000000000000..ce52a2fb0b53 --- /dev/null +++ b/python/ide/impl/resources/icons/pythonFile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/icons/pythonFile_dark.svg b/python/ide/impl/resources/icons/pythonFile_dark.svg new file mode 100644 index 000000000000..62030c35b4e2 --- /dev/null +++ b/python/ide/impl/resources/icons/pythonFile_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml b/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml index 32d6ae5c115b..0e98cc1a92d9 100644 --- a/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml +++ b/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml @@ -3,6 +3,7 @@ + @@ -20,6 +21,8 @@ + + diff --git a/python/ide/impl/resources/messages/PyWelcomeBundle.properties b/python/ide/impl/resources/messages/PyWelcomeBundle.properties index 9cc36f2cc82b..de5515e8639d 100644 --- a/python/ide/impl/resources/messages/PyWelcomeBundle.properties +++ b/python/ide/impl/resources/messages/PyWelcomeBundle.properties @@ -12,4 +12,13 @@ py.welcome.script.toggle.breakpoint=Press {0} to toggle the breakpoint. py.welcome.script.run=Press the green button in the gutter to run the script. -py.welcome.script.help=See PyCharm help at https://www.jetbrains.com/help/pycharm/ \ No newline at end of file +py.welcome.script.help=See PyCharm help at https://www.jetbrains.com/help/pycharm/ + +non.modal.welcome.screen.title=Welcome to PyCharm +non.modal.welcome.screen.secondary.title=Start new project in one click +non.modal.welcome.screen.feature.script=Script +non.modal.welcome.screen.feature.notebook=Notebook +non.modal.welcome.screen.feature.plugins=Plugins +non.modal.welcome.screen.feature.start.with.ai=Start With AI +non.modal.welcome.screen.feature.learn=Learn +non.modal.welcome.screen.feature.import.file=Import File diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/configuration/PySdkStatusBar.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/configuration/PySdkStatusBar.kt index d53b5f87f9e7..c9a0b98d8def 100644 --- a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/configuration/PySdkStatusBar.kt +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/configuration/PySdkStatusBar.kt @@ -17,6 +17,7 @@ import com.intellij.openapi.util.registry.Registry import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.wm.StatusBarWidget import com.intellij.openapi.wm.StatusBarWidgetFactory +import com.intellij.openapi.wm.ex.WelcomeScreenProjectProvider.Companion.isWelcomeScreenProject import com.intellij.openapi.wm.impl.status.EditorBasedStatusBarPopup import com.intellij.util.PlatformUtils import com.intellij.util.messages.MessageBusConnection @@ -39,7 +40,7 @@ private class PySdkStatusBarWidgetFactory : StatusBarWidgetFactory { override fun getDisplayName(): String = PyBundle.message("configurable.PyActiveSdkModuleConfigurable.python.interpreter.display.name") override fun isAvailable(project: Project): Boolean { - return PythonIdeLanguageCustomization.isMainlyPythonIde() && !isDataSpellInterpreterWidgetEnabled() + return PythonIdeLanguageCustomization.isMainlyPythonIde() && !isDataSpellInterpreterWidgetEnabled() && !isWelcomeScreenProject(project) } override fun createWidget(project: Project, scope: CoroutineScope): StatusBarWidget = PySdkStatusBar(project, scope) diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/MiscFileType.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/MiscFileType.kt index 945ae6ac06bf..795da7573c16 100644 --- a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/MiscFileType.kt +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/MiscFileType.kt @@ -15,7 +15,7 @@ interface MiscFileType { companion object { val EP: ExtensionPointName = ExtensionPointName.create("Pythonid.miscFileType") } - + val id: String val title: @NlsActions.ActionText String val icon: Icon val fileName: TemplateFileName diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/impl/MiscScriptFileType.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/impl/MiscScriptFileType.kt index 71b0e5df31bf..bd905afe1ee4 100644 --- a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/impl/MiscScriptFileType.kt +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/miscProject/impl/MiscScriptFileType.kt @@ -14,6 +14,7 @@ import org.jetbrains.annotations.NonNls import javax.swing.Icon object MiscScriptFileType : MiscFileType { + override val id: String = "newScript" override val title: @NlsActions.ActionText String = PyCharmCommunityCustomizationBundle.message("misc.script.text") override val icon: Icon = PythonPsiApiIcons.Python_32x32 override val fileName: TemplateFileName = TemplateFileName.parse("script.py") diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.java b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.java deleted file mode 100644 index 147f97e7528c..000000000000 --- a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.pycharm.community.ide.impl.newProjectWizard.welcome; - -import com.intellij.DynamicBundle; -import org.jetbrains.annotations.Nls; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.PropertyKey; - -final class PyWelcomeBundle { - private static final @NonNls String BUNDLE = "messages.PyWelcomeBundle"; - private static final DynamicBundle INSTANCE = new DynamicBundle(PyWelcomeBundle.class, BUNDLE); - - private PyWelcomeBundle() {} - - public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { - return INSTANCE.getMessage(key, params); - } -} diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.kt new file mode 100644 index 000000000000..41c5d6b59e4c --- /dev/null +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/newProjectWizard/welcome/PyWelcomeBundle.kt @@ -0,0 +1,27 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl.newProjectWizard.welcome + +import com.intellij.DynamicBundle +import org.jetbrains.annotations.ApiStatus +import org.jetbrains.annotations.Nls +import org.jetbrains.annotations.NonNls +import org.jetbrains.annotations.PropertyKey +import java.util.function.Supplier + +@NonNls +private const val BUNDLE = "messages.PyWelcomeBundle" + +@ApiStatus.Internal +object PyWelcomeBundle { + private val instance = DynamicBundle(PyWelcomeBundle::class.java, BUNDLE) + + @JvmStatic + fun message(key: @PropertyKey(resourceBundle = BUNDLE) String, vararg params: Any): @Nls String { + return instance.getMessage(key, *params) + } + + @JvmStatic + fun lazyMessage(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): Supplier<@Nls String> { + return instance.getLazyMessage(key, *params) + } +} diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabContentProvider.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabContentProvider.kt new file mode 100644 index 000000000000..73932e3421db --- /dev/null +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabContentProvider.kt @@ -0,0 +1,104 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl.welcomeScreen + +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.vector.ImageVector +import com.intellij.ide.plugins.PluginManagerConfigurable +import com.intellij.openapi.actionSystem.ActionManager +import com.intellij.openapi.actionSystem.ActionPlaces +import com.intellij.openapi.actionSystem.ActionUiKind +import com.intellij.openapi.actionSystem.AnActionEvent.createEvent +import com.intellij.openapi.actionSystem.impl.SimpleDataContext +import com.intellij.openapi.options.ShowSettingsUtil +import com.intellij.openapi.project.Project +import com.intellij.openapi.wm.impl.welcomeScreen.learnIde.editorTab.LearnIdeEditorTab +import com.intellij.platform.ide.nonModalWelcomeScreen.rightTab.WelcomeRightTabContentProvider +import com.intellij.pycharm.community.ide.impl.PycharmCommunityIdeImplIcons +import com.intellij.pycharm.community.ide.impl.miscProject.MiscFileType +import com.intellij.pycharm.community.ide.impl.miscProject.PyMiscService +import com.intellij.pycharm.community.ide.impl.miscProject.impl.MiscScriptFileType +import com.intellij.pycharm.community.ide.impl.newProjectWizard.welcome.PyWelcomeBundle +import com.intellij.util.application +import org.jetbrains.jewel.ui.icon.PathIconKey +import java.util.function.Supplier + +class PyCharmWelcomeRightTabContentProvider : WelcomeRightTabContentProvider { + override val backgroundImageVectorLight: ImageVector = PyCharmWelcomeRightTabLightBackground + override val backgroundImageVectorDark: ImageVector = PyCharmWelcomeRightTabDarkBackground + + override val title: Supplier = PyWelcomeBundle.lazyMessage("non.modal.welcome.screen.title") + override val secondaryTitle: Supplier = PyWelcomeBundle.lazyMessage("non.modal.welcome.screen.secondary.title") + + @Composable + override fun getFeatureButtonModels(project: Project): List { + return listOfNotNull( + newScriptFeatureButtonModel(project), + newNotebookFeatureButtonModel(project), + importFileFeatureButtonModel(project), + learnFeatureButtonModel(project), + pluginsFeatureButtonModel(project) + ) + } + + private fun newScriptFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel { + val scriptMiscType = MiscScriptFileType + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.script"), + icon = PathIconKey("icons/pythonFile.svg", PycharmCommunityIdeImplIcons::class.java) + ) { + PyMiscService.getInstance().createMiscProject(project, scriptMiscType) + } + } + + private fun newNotebookFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel? { + val notebookMiscType = MiscFileType.EP.extensionList.find { it.id == "newNotebook" } ?: return null + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.notebook"), + icon = PathIconKey("icons/jupyterNotebook.svg", PycharmCommunityIdeImplIcons::class.java), + ) { + PyMiscService.getInstance().createMiscProject(project, notebookMiscType) + } + } + + private fun learnFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel { + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.learn"), + icon = PathIconKey("icons/learn.svg", PycharmCommunityIdeImplIcons::class.java) + ) { + LearnIdeEditorTab.openLearnIdeInEditorTab(project) + } + } + + private fun importFileFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel { + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.import.file"), + icon = PathIconKey("icons/importFile.svg", PycharmCommunityIdeImplIcons::class.java), + ) { + val action = ActionManager.getInstance().getAction("OpenFile") + val event = createEvent(action, SimpleDataContext.getProjectContext(project), null, ActionPlaces.WELCOME_SCREEN, ActionUiKind.NONE, null) + action.actionPerformed(event) + } + } + + // Not yet implemented + @Suppress("unused") + private fun junieFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel { + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.start.with.ai"), + icon = PathIconKey("icons/junie.svg", PycharmCommunityIdeImplIcons::class.java), + ) { + + } + } + + private fun pluginsFeatureButtonModel(project: Project): WelcomeRightTabContentProvider.FeatureButtonModel { + return WelcomeRightTabContentProvider.FeatureButtonModel( + text = PyWelcomeBundle.message("non.modal.welcome.screen.feature.plugins"), + icon = PathIconKey("expui/nodes/plugin.svg", PycharmCommunityIdeImplIcons::class.java), + ) { + application.invokeLater { + ShowSettingsUtil.getInstance().showSettingsDialog(project, PluginManagerConfigurable::class.java) + } + } + } +} diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabDarkBackground.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabDarkBackground.kt new file mode 100644 index 000000000000..6bc76ed4f966 --- /dev/null +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabDarkBackground.kt @@ -0,0 +1,97 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl.welcomeScreen + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val PyCharmWelcomeRightTabDarkBackground: ImageVector + get() { + if (_PyCharmWelcomeRightTabDarkBackground != null) { + return _PyCharmWelcomeRightTabDarkBackground!! + } + _PyCharmWelcomeRightTabDarkBackground = ImageVector.Builder( + name = "PyCharmWelcomeRightTabDarkBackground", + defaultWidth = 1094.dp, + defaultHeight = 847.dp, + viewportWidth = 1094f, + viewportHeight = 847f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(1094f) + verticalLineToRelative(847f) + horizontalLineToRelative(-1094f) + close() + } + ) { + path( + fill = SolidColor(Color(0xFF00C4F4)), + fillAlpha = 0.5f, + strokeAlpha = 0.5f, + pathFillType = PathFillType.EvenOdd + ) { + moveTo(539.9f, -325f) + curveTo(689.8f, -325f, 689.8f, -275f, 689.8f, -175.1f) + lineTo(689.8f, -50.1f) + curveTo(689.8f, -8.7f, 656.2f, 24.9f, 614.8f, 24.9f) + horizontalLineTo(464.9f) + curveTo(395.9f, 24.9f, 339.9f, 80.8f, 339.9f, 149.8f) + verticalLineTo(174.8f) + curveTo(240f, 174.8f, 190f, 174.8f, 190f, 24.9f) + curveTo(190f, -125.1f, 240f, -125.1f, 339.9f, -125.1f) + lineTo(514.9f, -125.1f) + curveTo(528.7f, -125.1f, 539.9f, -136.3f, 539.9f, -150.1f) + curveTo(539.9f, -163.9f, 528.7f, -175.1f, 514.9f, -175.1f) + horizontalLineTo(389.9f) + curveTo(389.9f, -275f, 389.9f, -325f, 539.9f, -325f) + close() + moveTo(464.9f, -225f) + curveTo(478.7f, -225f, 489.9f, -236.2f, 489.9f, -250f) + curveTo(489.9f, -263.8f, 478.7f, -275f, 464.9f, -275f) + curveTo(451.1f, -275f, 439.9f, -263.8f, 439.9f, -250f) + curveTo(439.9f, -236.2f, 451.1f, -225f, 464.9f, -225f) + close() + } + path( + fill = SolidColor(Color(0xFFFFFC7B)), + fillAlpha = 0.5f, + strokeAlpha = 0.5f, + pathFillType = PathFillType.EvenOdd + ) { + moveTo(754.1f, -110.8f) + verticalLineTo(-35.8f) + curveTo(754.1f, 33.2f, 698.1f, 89.1f, 629.1f, 89.1f) + horizontalLineTo(479.2f) + curveTo(437.8f, 89.1f, 404.2f, 122.7f, 404.2f, 164.1f) + lineTo(404.2f, 239.1f) + curveTo(404.2f, 339f, 404.2f, 389f, 554.1f, 389f) + curveTo(704.1f, 389f, 704.1f, 339f, 704.1f, 239.1f) + lineTo(579.1f, 239.1f) + curveTo(565.3f, 239.1f, 554.1f, 227.9f, 554.1f, 214.1f) + curveTo(554.1f, 200.3f, 565.3f, 189.1f, 579.1f, 189.1f) + lineTo(754.1f, 189.1f) + curveTo(854f, 189.1f, 904f, 189.1f, 904f, 39.1f) + curveTo(904f, -110.8f, 854f, -110.8f, 754.1f, -110.8f) + close() + moveTo(629.1f, 339f) + curveTo(642.9f, 339f, 654.1f, 327.8f, 654.1f, 314f) + curveTo(654.1f, 300.2f, 642.9f, 289f, 629.1f, 289f) + curveTo(615.3f, 289f, 604.1f, 300.2f, 604.1f, 314f) + curveTo(604.1f, 327.8f, 615.3f, 339f, 629.1f, 339f) + close() + } + } + }.build() + + return _PyCharmWelcomeRightTabDarkBackground!! + } + +@Suppress("ObjectPropertyName") +private var _PyCharmWelcomeRightTabDarkBackground: ImageVector? = null diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabLightBackground.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabLightBackground.kt new file mode 100644 index 000000000000..845e800898e9 --- /dev/null +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeRightTabLightBackground.kt @@ -0,0 +1,97 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl.welcomeScreen + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathData +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val PyCharmWelcomeRightTabLightBackground: ImageVector + get() { + if (_PyCharmWelcomeRightTabLightBackground != null) { + return _PyCharmWelcomeRightTabLightBackground!! + } + _PyCharmWelcomeRightTabLightBackground = ImageVector.Builder( + name = "PyCharmWelcomeRightTabLightBackground", + defaultWidth = 1094.dp, + defaultHeight = 878.dp, + viewportWidth = 1094f, + viewportHeight = 878f + ).apply { + group( + clipPathData = PathData { + moveTo(0f, 0f) + horizontalLineToRelative(1094f) + verticalLineToRelative(1117f) + horizontalLineToRelative(-1094f) + close() + } + ) { + path( + fill = SolidColor(Color(0xFF00C4F4)), + fillAlpha = 0.5f, + strokeAlpha = 0.5f, + pathFillType = PathFillType.EvenOdd + ) { + moveTo(539.9f, -324f) + curveTo(689.8f, -324f, 689.8f, -274f, 689.8f, -174.1f) + lineTo(689.8f, -49.1f) + curveTo(689.8f, -7.7f, 656.2f, 25.9f, 614.8f, 25.9f) + horizontalLineTo(464.9f) + curveTo(395.9f, 25.9f, 339.9f, 81.8f, 339.9f, 150.8f) + verticalLineTo(175.8f) + curveTo(240f, 175.8f, 190f, 175.8f, 190f, 25.9f) + curveTo(190f, -124.1f, 240f, -124.1f, 339.9f, -124.1f) + lineTo(514.9f, -124.1f) + curveTo(528.7f, -124.1f, 539.9f, -135.3f, 539.9f, -149.1f) + curveTo(539.9f, -162.9f, 528.7f, -174.1f, 514.9f, -174.1f) + horizontalLineTo(389.9f) + curveTo(389.9f, -274f, 389.9f, -324f, 539.9f, -324f) + close() + moveTo(464.9f, -224f) + curveTo(478.7f, -224f, 489.9f, -235.2f, 489.9f, -249f) + curveTo(489.9f, -262.8f, 478.7f, -274f, 464.9f, -274f) + curveTo(451.1f, -274f, 439.9f, -262.8f, 439.9f, -249f) + curveTo(439.9f, -235.2f, 451.1f, -224f, 464.9f, -224f) + close() + } + path( + fill = SolidColor(Color(0xFFFFFC7B)), + fillAlpha = 0.5f, + strokeAlpha = 0.5f, + pathFillType = PathFillType.EvenOdd + ) { + moveTo(754.1f, -109.8f) + verticalLineTo(-34.8f) + curveTo(754.1f, 34.2f, 698.1f, 90.1f, 629.1f, 90.1f) + horizontalLineTo(479.2f) + curveTo(437.8f, 90.1f, 404.2f, 123.7f, 404.2f, 165.1f) + lineTo(404.2f, 240.1f) + curveTo(404.2f, 340f, 404.2f, 390f, 554.1f, 390f) + curveTo(704.1f, 390f, 704.1f, 340f, 704.1f, 240.1f) + lineTo(579.1f, 240.1f) + curveTo(565.3f, 240.1f, 554.1f, 228.9f, 554.1f, 215.1f) + curveTo(554.1f, 201.3f, 565.3f, 190.1f, 579.1f, 190.1f) + lineTo(754.1f, 190.1f) + curveTo(854f, 190.1f, 904f, 190.1f, 904f, 40.1f) + curveTo(904f, -109.8f, 854f, -109.8f, 754.1f, -109.8f) + close() + moveTo(629.1f, 340f) + curveTo(642.9f, 340f, 654.1f, 328.8f, 654.1f, 315f) + curveTo(654.1f, 301.2f, 642.9f, 290f, 629.1f, 290f) + curveTo(615.3f, 290f, 604.1f, 301.2f, 604.1f, 315f) + curveTo(604.1f, 328.8f, 615.3f, 340f, 629.1f, 340f) + close() + } + } + }.build() + + return _PyCharmWelcomeRightTabLightBackground!! + } + +@Suppress("ObjectPropertyName") +private var _PyCharmWelcomeRightTabLightBackground: ImageVector? = null diff --git a/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeScreenProjectProvider.kt b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeScreenProjectProvider.kt new file mode 100644 index 000000000000..2ca5cf9c61a9 --- /dev/null +++ b/python/ide/impl/src/com/intellij/pycharm/community/ide/impl/welcomeScreen/PyCharmWelcomeScreenProjectProvider.kt @@ -0,0 +1,19 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.pycharm.community.ide.impl.welcomeScreen + +import com.intellij.openapi.project.Project +import com.intellij.openapi.wm.ex.WelcomeScreenProjectProvider + +private const val WELCOME_SCREEN_PROJECT_NAME: String = "PyCharmWelcomeScreen" + +private class PyCharmWelcomeScreenProjectProvider : WelcomeScreenProjectProvider() { + override fun getWelcomeScreenProjectName(): String = WELCOME_SCREEN_PROJECT_NAME + + override fun doIsWelcomeScreenProject(project: Project): Boolean = project.name == WELCOME_SCREEN_PROJECT_NAME + + override fun doIsForceDisabledFileColors(): Boolean { + return true + } + + override fun doGetCreateNewFileProjectPrefix(): String = "awesomeProject" +} diff --git a/python/pluginCore/resources/META-INF/plugin.xml b/python/pluginCore/resources/META-INF/plugin.xml index 47cb6faa853e..e7836aa938e3 100644 --- a/python/pluginCore/resources/META-INF/plugin.xml +++ b/python/pluginCore/resources/META-INF/plugin.xml @@ -69,6 +69,6 @@ The Python plug-in provides smart editing for Python scripts. The feature set of - +