Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class DropdownPopup {
private static final int BORDER_ARC = 8;
private static final int MAX_VISIBLE_ITEMS = 15;
private static final int SHORT_POPUP_WIDTH = 250;
private static final int LONG_POPUP_WIDTH = 300;

private static Image checkIcon;

Expand Down Expand Up @@ -518,11 +517,9 @@ private void openHoverShell(DropdownItem item, Composite anchorItem) {

hoverShell.pack();
Point hoverSize = hoverShell.getSize();
int width = hoverSize.x <= SHORT_POPUP_WIDTH ? SHORT_POPUP_WIDTH : LONG_POPUP_WIDTH;
if (width != hoverSize.x) {
// Recompute size at the target width so wrapped labels lay out correctly.
hoverSize = hoverShell.computeSize(width, SWT.DEFAULT);
hoverSize.x = width;
if (hoverSize.x < SHORT_POPUP_WIDTH) {
hoverSize = hoverShell.computeSize(SHORT_POPUP_WIDTH, SWT.DEFAULT);
hoverSize.x = SHORT_POPUP_WIDTH;
hoverShell.setSize(hoverSize);
}

Expand Down
Loading