File tree 1 file changed +6
-4
lines changed
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*******************************************************************************
2
- * Copyright (c) 2000, 2015 IBM Corporation and others.
2
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
3
3
*
4
4
* This program and the accompanying materials
5
5
* are made available under the terms of the Eclipse Public License 2.0
@@ -100,13 +100,15 @@ protected Control createMessageArea(Composite composite) {
100
100
if (message != null ) {
101
101
messageLabel = new Label (composite , getMessageLabelStyle ());
102
102
messageLabel .setText (message );
103
+ int xHint = message .length () > 40
104
+ ? convertHorizontalDLUsToPixels (IDialogConstants .MINIMUM_MESSAGE_AREA_WIDTH )
105
+ : convertHorizontalDLUsToPixels (IDialogConstants .MINIMUM_MESSAGE_AREA_WIDTH - 50 );
103
106
GridDataFactory
104
107
.fillDefaults ()
105
108
.align (SWT .FILL , SWT .BEGINNING )
106
109
.grab (true , false )
107
- .hint (
108
- convertHorizontalDLUsToPixels (IDialogConstants .MINIMUM_MESSAGE_AREA_WIDTH ),
109
- SWT .DEFAULT ).applyTo (messageLabel );
110
+ .hint (xHint , SWT .DEFAULT )
111
+ .applyTo (messageLabel );
110
112
}
111
113
return composite ;
112
114
}
You can’t perform that action at this time.
0 commit comments