mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-183991 UI Inspector accessibility audit: small UI improvements
* Add a tooltip for the property value cell * Change the description panel background, padding, and border to be similar to the preview GitOrigin-RevId: c7363104b384c879021c5efbecd56d72a1ffdb4f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
41efafc41c
commit
42497ec112
@@ -47,4 +47,5 @@ ui.inspector.accessibility.audit.AccessibleValueNotNullInspection.description=Ac
|
||||
# suppress inspection "UnusedProperty"
|
||||
ui.inspector.accessibility.audit.ImplementsAccessibleInterfaceInspection.description=Interface Accessible should be implemented.
|
||||
|
||||
ui.inspector.accessibility.audit.tooltip={0,choice,0#No accessibility issues|1#Accessibility issues: } {1, choice, 0#|1# 1 error|2#{1} errors} {2,choice,0#|1# 1 warning|2#, {2} warnings} {3,choice,0#|1# 1 recommendation|2#, {3} recommendations}
|
||||
ui.inspector.accessibility.audit.tree.tooltip={0,choice,0#No accessibility issues|1#Accessibility issues: } {1, choice, 0#|1# 1 error|2#{1} errors} {2,choice,0#|1# 1 warning|2#, {2} warnings} {3,choice,0#|1# 1 recommendation|2#, {3} recommendations}
|
||||
ui.inspector.accessibility.audit.table.property.name.tooltip=Select the value cell to see failed inspections
|
||||
+2
-1
@@ -496,7 +496,8 @@ public abstract class HierarchyTree extends JTree implements TreeSelectionListen
|
||||
));
|
||||
}
|
||||
}
|
||||
myToolTipText = InternalActionsBundle.message("ui.inspector.accessibility.audit.tooltip", count.getTotal(), count.getErrors(),
|
||||
myToolTipText =
|
||||
InternalActionsBundle.message("ui.inspector.accessibility.audit.tree.tooltip", count.getTotal(), count.getErrors(),
|
||||
count.getWarnings(), count.getRecommendations());
|
||||
}
|
||||
}
|
||||
|
||||
+10
-5
@@ -17,6 +17,7 @@ import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.impl.EditorComponentImpl;
|
||||
import com.intellij.openapi.ide.CopyPasteManager;
|
||||
import com.intellij.openapi.progress.EmptyProgressIndicator;
|
||||
@@ -478,17 +479,19 @@ final class InspectorTable extends JBSplitter implements UiDataProvider, Disposa
|
||||
for (UiInspectorAccessibilityInspection failedInspection : myFailedInspections) {
|
||||
if (failedInspection.getPropertyName().equalsIgnoreCase(selectedProperty.trim())) {
|
||||
inspectionCount++;
|
||||
|
||||
JPanel inspectionPanel = new JPanel(new BorderLayout());
|
||||
inspectionPanel.setBorder(JBUI.Borders.empty(10));
|
||||
inspectionPanel.setBorder(BorderFactory.createLineBorder(JBColor.border()));
|
||||
JTextArea textArea = new JTextArea(failedInspection.getDescription());
|
||||
textArea.setEditable(false);
|
||||
textArea.setLineWrap(true);
|
||||
textArea.setWrapStyleWord(true);
|
||||
textArea.setBorder(null);
|
||||
textArea.setMinimumSize(JBUI.size(200, 100));
|
||||
textArea.setBorder(new JBEmptyBorder(4, 10, 4, 4));
|
||||
textArea.setMinimumSize(JBUI.size(20, 10));
|
||||
textArea.setOpaque(true);
|
||||
// Set the color similar to the preview component, which is a console view
|
||||
textArea.setBackground(
|
||||
EditorColorsManager.getInstance().getGlobalScheme().getColor(ConsoleViewContentType.CONSOLE_BACKGROUND_KEY));
|
||||
inspectionPanel.add(textArea, BorderLayout.CENTER);
|
||||
|
||||
myAccessibilityInspectionTabs.addTab(
|
||||
InternalActionsBundle.message("ui.inspector.accessibility.audit.inspection.tab.text", inspectionCount), inspectionPanel);
|
||||
}
|
||||
@@ -691,9 +694,11 @@ final class InspectorTable extends JBSplitter implements UiDataProvider, Disposa
|
||||
if (failedInspection.getPropertyName().equalsIgnoreCase(propertyName.trim())) {
|
||||
this.setIcon(failedInspection.getIcon());
|
||||
this.setHorizontalTextPosition(LEFT);
|
||||
this.setToolTipText(InternalActionsBundle.message("ui.inspector.accessibility.audit.table.property.name.tooltip"));
|
||||
break;
|
||||
}
|
||||
else {
|
||||
this.setToolTipText(null);
|
||||
this.setIcon(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user