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
This commit is contained in:
Ilya.Kazakevich
2024-11-20 18:23:33 +01:00
committed by intellij-monorepo-bot
parent 73fc94c8ab
commit 89e0d237d4

View File

@@ -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 {