IDEA-336399 Presentation Assistant: fix small bottom border when only title is showing

There was an overlap of the label with the border for 2px.

GitOrigin-RevId: c740ad3ea892592e6f340917e41bbc31b407f128
This commit is contained in:
Konstantin Hudyakov
2023-10-26 19:39:39 +03:00
committed by intellij-monorepo-bot
parent 8583289898
commit 6f3501f3c2

View File

@@ -33,11 +33,11 @@ internal class ActionInfoPanel(textData: TextData, private val appearance: Actio
layout = GridLayout()
border = JBUI.Borders.empty(appearance.popupInsets)
val titleSubtitleIntersection = if (appearance.titleSubtitleGap < 0) UnscaledGaps(bottom = -appearance.titleSubtitleGap) else UnscaledGaps.EMPTY
val titleSubtitleIntersection = if (appearance.titleSubtitleGap < 0) UnscaledGaps(top = -appearance.titleSubtitleGap) else UnscaledGaps.EMPTY
RowsGridBuilder(this)
.row(resizable = true).cell(component = titleLabel, verticalAlign = VerticalAlign.CENTER, resizableColumn = true, visualPaddings = titleSubtitleIntersection)
.row(resizable = true).cell(component = subtitleLabel, verticalAlign = VerticalAlign.CENTER, resizableColumn = true)
.row(resizable = true).cell(component = titleLabel, verticalAlign = VerticalAlign.CENTER, resizableColumn = true)
.row(resizable = true).cell(component = subtitleLabel, verticalAlign = VerticalAlign.CENTER, resizableColumn = true, visualPaddings = titleSubtitleIntersection)
titleLabel.foreground = appearance.theme.foreground