File tree 2 files changed +6
-6
lines changed
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs
2 files changed +6
-6
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,14 @@ protected Control createMessageArea(Composite composite) {
100
100
if (message != null ) {
101
101
messageLabel = new Label (composite , getMessageLabelStyle ());
102
102
messageLabel .setText (message );
103
+ int minWidthHint = convertHorizontalDLUsToPixels (IDialogConstants .MINIMUM_MESSAGE_AREA_WIDTH - 50 );
103
104
GridDataFactory
104
105
.fillDefaults ()
105
106
.align (SWT .FILL , SWT .BEGINNING )
106
107
.grab (true , false )
107
- .hint (
108
- convertHorizontalDLUsToPixels ( IDialogConstants . MINIMUM_MESSAGE_AREA_WIDTH ),
109
- SWT . DEFAULT ) .applyTo (messageLabel );
108
+ .indent ( 5 , 0 )
109
+ . hint ( message . length () > 40 ? minWidthHint : SWT . DEFAULT , SWT . DEFAULT )
110
+ .applyTo (messageLabel );
110
111
}
111
112
return composite ;
112
113
}
Original file line number Diff line number Diff line change 1
1
/*******************************************************************************
2
- * Copyright (c) 2000, 2016 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
@@ -328,7 +328,6 @@ protected Control createDialogArea(Composite parent) {
328
328
layout .marginWidth = 0 ;
329
329
composite .setLayout (layout );
330
330
GridData data = new GridData (GridData .FILL_BOTH );
331
- data .horizontalSpan = 2 ;
332
331
composite .setLayoutData (data );
333
332
// allow subclasses to add custom controls
334
333
customArea = createCustomArea (composite );
You can’t perform that action at this time.
0 commit comments