Skip to content

Commit d12bd6c

Browse files
committed
[GTK4] Clamp height of combo drop-down arrow to client area height
Fixes #2817
1 parent c6ec34e commit d12bd6c

File tree

1 file changed

+3
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom

1 file changed

+3
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,9 @@ void internalLayout (boolean changed) {
11871187
int width = rect.width;
11881188
int height = rect.height;
11891189
Point arrowSize = arrow.computeSize (SWT.DEFAULT, height, changed);
1190+
// clamp the height of the arrow to the maximum of the client area
1191+
// https://github.com/eclipse-platform/eclipse.platform.swt/issues/2817
1192+
arrowSize.y = Math.min(height, arrowSize.y);
11901193
text.setBounds (0, 0, width - arrowSize.x, height);
11911194
arrow.setBounds (width - arrowSize.x, 0, arrowSize.x, arrowSize.y);
11921195
}

0 commit comments

Comments
 (0)