Skip to content

Commit 70be794

Browse files
Specify explicit foreground color for "GotItMessage" (#2095)
Specify explicit foreground color for "GotItMessage" as it appears unreadable under light themes in new IDEA UI
1 parent db0c21a commit 70be794

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import com.intellij.openapi.wm.WindowManager
1818
import com.intellij.ui.GotItMessage
1919
import com.intellij.ui.awt.RelativePoint
2020
import com.intellij.util.ui.JBFont
21+
import com.intellij.util.ui.UIUtil
2122
import java.awt.Point
2223
import javax.swing.event.HyperlinkEvent
2324
import mu.KotlinLogging
@@ -201,7 +202,7 @@ object GotItTooltipActivity : StartupActivity {
201202
.getKeyboardShortcut("org.utbot.intellij.plugin.ui.actions.GenerateTestsAction")?:return@invokeLater
202203
val shortcutText = KeymapUtil.getShortcutText(shortcut)
203204
val message = GotItMessage.createMessage("UnitTestBot is ready!",
204-
"<div style=\"font-size:${JBFont.label().biggerOn(2.toFloat()).size}pt;\">" +
205+
"<div style=\"font-size:${JBFont.label().biggerOn(2.toFloat()).size}pt;color:#${UIUtil.colorToHex(UIUtil.getLabelForeground())};\">" +
205206
"You can get test coverage for methods, Java classes,<br>and even for whole source roots<br> with <b>$shortcutText</b></div>")
206207
message.setCallback { PropertiesComponent.getInstance().setValue(KEY, true) }
207208
WindowManager.getInstance().getFrame(project)?.rootPane?.let {

0 commit comments

Comments
 (0)