From 89e0d237d440cc7fdfad87e2b4f5c559bd33c18e Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Wed, 20 Nov 2024 18:23:33 +0100 Subject: [PATCH] PY-75549: Fix "Create" text on Welcome Screen. https://youtrack.jetbrains.com/issue/PY-75549/Simplify-creation-of-the-default-first-project#focus=Comments-27-11093574.0-0 `comment` is 12 by default, while `text` is 13 (According to DSL UI' author Pavel Porvatov) Other scales are also fixed (cherry picked from commit 9f415b5a329f535925d47e0487eca384a185a343) IJ-CR-149723 GitOrigin-RevId: ad4d1da11cc7bfbc30f63d7ebb3bf686b17d38c2 --- .../wm/impl/welcomeScreen/EmptyStateProjectsPanel.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/EmptyStateProjectsPanel.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/EmptyStateProjectsPanel.kt index a5acb86b8a59..e2992930cc24 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/EmptyStateProjectsPanel.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/EmptyStateProjectsPanel.kt @@ -16,9 +16,11 @@ import com.intellij.ui.components.DropDownLink import com.intellij.ui.dsl.builder.AlignX import com.intellij.ui.dsl.builder.panel import com.intellij.ui.dsl.gridLayout.UnscaledGaps +import com.intellij.ui.dsl.gridLayout.UnscaledGapsY import com.intellij.ui.scale.JBUIScale.scale import com.intellij.util.concurrency.annotations.RequiresEdt import com.intellij.util.ui.FocusUtil +import com.intellij.util.ui.JBUI import java.awt.Font import javax.swing.JComponent @@ -28,15 +30,15 @@ internal fun emptyStateProjectPanel(disposable: Disposable): JComponent = panel row { label(WelcomeScreenComponentFactory.getApplicationTitle()).applyToComponent { font = font.deriveFont(font.getSize() + scale(13).toFloat()).deriveFont(Font.BOLD) - }.customize(UnscaledGaps(top = 103, bottom = 17)) + }.customize(UnscaledGaps(top = 105, bottom = 21)) .align(AlignX.CENTER) } for (text in arrayOf( IdeBundle.message("welcome.screen.empty.projects.create.comment"), IdeBundle.message("welcome.screen.empty.projects.open.comment"))) { row { - comment(text).align(AlignX.CENTER).customize(UnscaledGaps(2)) - } + text(text).align(AlignX.CENTER).customize(UnscaledGaps(0)).applyToComponent { foreground = JBUI.CurrentTheme.ContextHelp.FOREGROUND } + }.customize(UnscaledGapsY(bottom = 7)) } val (mainActions, moreActions) = createActionToolbars(disposable) panel {