mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-132507 "Clear Read-Only Status" dialog too wide
This commit is contained in:
+4
-2
@@ -18,6 +18,7 @@ package com.intellij.openapi.vcs.readOnlyHandler;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vcs.VcsBundle;
|
||||
import com.intellij.openapi.vfs.ReadonlyStatusHandler;
|
||||
import com.intellij.ui.CollectionComboBoxModel;
|
||||
@@ -107,11 +108,12 @@ public class ReadOnlyStatusDialog extends OptionsDialog {
|
||||
@Override
|
||||
protected void doCustomize(JList list, String value, int index, boolean selected, boolean hasFocus) {
|
||||
if (value == null) return;
|
||||
String trimmed = StringUtil.first(value, 50, true);
|
||||
if (value.equals(defaultChangelist)) {
|
||||
append(value, selected ? SELECTED_BOLD_ATTRIBUTES : BOLD_ATTRIBUTES);
|
||||
append(trimmed, selected ? SELECTED_BOLD_ATTRIBUTES : BOLD_ATTRIBUTES);
|
||||
}
|
||||
else {
|
||||
append(value, selected ? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES);
|
||||
append(trimmed, selected ? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user