From 2cf802a9c937ed1a5cd0f774af6e67a461930e5e Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Wed, 26 Nov 2025 10:57:04 -0500 Subject: [PATCH] [GTK4] Clamp height of combo drop-down arrow to client area height Fixes https://github.com/eclipse-platform/eclipse.platform.swt/issues/2817 --- .../common/org/eclipse/swt/custom/CCombo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java index c700fd16327..4b5241545cb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java @@ -1187,6 +1187,9 @@ void internalLayout (boolean changed) { int width = rect.width; int height = rect.height; Point arrowSize = arrow.computeSize (SWT.DEFAULT, height, changed); + // clamp the height of the arrow to the maximum of the client area + // https://github.com/eclipse-platform/eclipse.platform.swt/issues/2817 + arrowSize.y = Math.min(height, arrowSize.y); text.setBounds (0, 0, width - arrowSize.x, height); arrow.setBounds (width - arrowSize.x, 0, arrowSize.x, arrowSize.y); }