diff options
author | Alon Albert <aalbert@google.com> | 2022-07-18 12:16:19 -0700 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2022-07-21 19:01:49 +0000 |
commit | d8e69e550e84685a381120f4fcaf1a45a4c7b6ef (patch) | |
tree | 7dcc9281e70d8b74ffc7abd159b1538c66cbf52d /logcat | |
parent | d1bf9e6f2f47be57b68539bc5a2697d564b5023d (diff) | |
download | idea-d8e69e550e84685a381120f4fcaf1a45a4c7b6ef.tar.gz |
UI Tweaks to FilterTextField
1. Make named filters `bold` instead of `blue`
2. Add left & right padding
3. Change hint text
4. Change color of countLabel
https://screenshot.googleplex.com/BveHCoWs4CBqmGK.png
Fixes: 239438369
Fixes: 239438572
Fixes: 239438579
Fixes: 239437817
Test: Manually
Change-Id: I223a169a57e17e8129752b5188f722c7158346c4
Diffstat (limited to 'logcat')
-rw-r--r-- | logcat/resources/messages/LogcatBundle.properties | 2 | ||||
-rw-r--r-- | logcat/src/com/android/tools/idea/logcat/filters/FilterTextField.kt | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/logcat/resources/messages/LogcatBundle.properties b/logcat/resources/messages/LogcatBundle.properties index 660ec18eca9..2951adb8a38 100644 --- a/logcat/resources/messages/LogcatBundle.properties +++ b/logcat/resources/messages/LogcatBundle.properties @@ -74,7 +74,7 @@ logcat.filter.error=Invalid {0}: {1} logcat.filter.error.log.level=log level logcat.filter.error.duration=duration logcat.filter.error.qualifier=qualifier -logcat.filter.hint=Press Control + Space to see available options +logcat.filter.hint=Press Control + Space to see suggestions logcat.filter.clear.tooltip=Clear filter logcat.filter.tag.favorite.tooltip=Add to favorites logcat.filter.untag.favorite.tooltip=Remove from favorites diff --git a/logcat/src/com/android/tools/idea/logcat/filters/FilterTextField.kt b/logcat/src/com/android/tools/idea/logcat/filters/FilterTextField.kt index 19aa598e902..cd504f5fb75 100644 --- a/logcat/src/com/android/tools/idea/logcat/filters/FilterTextField.kt +++ b/logcat/src/com/android/tools/idea/logcat/filters/FilterTextField.kt @@ -39,7 +39,6 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.editor.event.DocumentEvent import com.intellij.openapi.editor.event.DocumentListener import com.intellij.openapi.editor.ex.EditorEx -import com.intellij.openapi.editor.markup.TextAttributes import com.intellij.openapi.project.Project import com.intellij.openapi.ui.popup.JBPopupFactory import com.intellij.openapi.ui.popup.PopupChooserBuilder @@ -48,7 +47,6 @@ import com.intellij.ui.CollectionListModel import com.intellij.ui.EditorTextField import com.intellij.ui.GotItTooltip import com.intellij.ui.GotItTooltip.Companion.BOTTOM_LEFT -import com.intellij.ui.JBColor.BLUE import com.intellij.ui.SimpleColoredComponent import com.intellij.ui.SimpleTextAttributes import com.intellij.ui.components.JBList @@ -119,7 +117,7 @@ private val HISTORY_ICON_BORDER = JBUI.Borders.empty(0, 5, 0, 4) private val HISTORY_LIST_SEPARATOR_BORDER = JBUI.Borders.empty(3) -private val NAMED_FILTER_HISTORY_ITEM_COLOR = SimpleTextAttributes.fromTextAttributes(TextAttributes(BLUE, null, null, null, Font.PLAIN)) +private val NAMED_FILTER_HISTORY_ITEM_COLOR = SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES private const val GOT_IT_ID = "filter.tip" @@ -129,6 +127,8 @@ private val LOGCAT_FILTER_HELP_URL = URL( "https://developer.android.com/studio/preview/features" + "?utm_source=android-studio-2021-3-1&utm_medium=studio-assistant-preview#logcat-search") +private val FILTER_HISTORY_ITEM_BORDER = JBUI.Borders.empty(0, 4) + /** * A text field for the filter. */ @@ -601,6 +601,7 @@ internal class FilterTextField( .addComponent(filterLabel) .addComponent(countLabel) .addComponent(deleteLabel)) + border = FILTER_HISTORY_ITEM_BORDER } } @@ -648,9 +649,9 @@ internal class FilterTextField( else -> Pair(list.foreground, list.background) } filterLabel.foreground = foreground - countLabel.foreground = foreground deleteLabel.foreground = foreground component.background = background + countLabel.foreground = if (isSelected) foreground else SimpleTextAttributes.GRAYED_ATTRIBUTES.fgColor return component } |