Skip to content

Commit f549998

Browse files
committed
Make message dialog more compact
Removed unnecessary spacing in the message dialog to improve visual alignment and create a more compact, cleaner layout. Fixes : eclipse-platform#2929
1 parent 766f285 commit f549998

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2015 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -104,9 +104,8 @@ protected Control createMessageArea(Composite composite) {
104104
.fillDefaults()
105105
.align(SWT.FILL, SWT.BEGINNING)
106106
.grab(true, false)
107-
.hint(
108-
convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
109-
SWT.DEFAULT).applyTo(messageLabel);
107+
.indent(5, 0)
108+
.hint(SWT.DEFAULT, SWT.DEFAULT).applyTo(messageLabel);
110109
}
111110
return composite;
112111
}

bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2016 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -328,7 +328,7 @@ protected Control createDialogArea(Composite parent) {
328328
layout.marginWidth = 0;
329329
composite.setLayout(layout);
330330
GridData data = new GridData(GridData.FILL_BOTH);
331-
data.horizontalSpan = 2;
331+
data.horizontalSpan = 1;
332332
composite.setLayoutData(data);
333333
// allow subclasses to add custom controls
334334
customArea = createCustomArea(composite);

0 commit comments

Comments
 (0)