File tree Expand file tree Collapse file tree
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ class DropdownPopup {
4949 private static final int BORDER_ARC = 8 ;
5050 private static final int MAX_VISIBLE_ITEMS = 15 ;
5151 private static final int SHORT_POPUP_WIDTH = 250 ;
52- private static final int LONG_POPUP_WIDTH = 300 ;
5352
5453 private static Image checkIcon ;
5554
@@ -518,11 +517,9 @@ private void openHoverShell(DropdownItem item, Composite anchorItem) {
518517
519518 hoverShell .pack ();
520519 Point hoverSize = hoverShell .getSize ();
521- int width = hoverSize .x <= SHORT_POPUP_WIDTH ? SHORT_POPUP_WIDTH : LONG_POPUP_WIDTH ;
522- if (width != hoverSize .x ) {
523- // Recompute size at the target width so wrapped labels lay out correctly.
524- hoverSize = hoverShell .computeSize (width , SWT .DEFAULT );
525- hoverSize .x = width ;
520+ if (hoverSize .x < SHORT_POPUP_WIDTH ) {
521+ hoverSize = hoverShell .computeSize (SHORT_POPUP_WIDTH , SWT .DEFAULT );
522+ hoverSize .x = SHORT_POPUP_WIDTH ;
526523 hoverShell .setSize (hoverSize );
527524 }
528525
You can’t perform that action at this time.
0 commit comments