mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix assertion in shortenTextWithEllipsis 2
GitOrigin-RevId: 49b52febe76a74fa52089ee001eb3f799de81842
This commit is contained in:
committed by
intellij-monorepo-bot
parent
da6fe12128
commit
827eb494d9
+1
-1
@@ -311,7 +311,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border, ErrorB
|
||||
String text = cc.getText();
|
||||
int maxWidth = bounds.width - (padding == null || UIUtil.isUnderDarcula() ? 0 : padding.right);
|
||||
if (StringUtil.isNotEmpty(text) && cc.getPreferredSize().width > maxWidth) {
|
||||
int max0 = ObjectUtils.binarySearch(1, text.length() - 1, idx -> {
|
||||
int max0 = ObjectUtils.binarySearch(7, text.length() - 1, idx -> {
|
||||
cc.setText(StringUtil.trimMiddle(text, idx));
|
||||
return Comparing.compare(cc.getPreferredSize().width, maxWidth);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user