Skip to content

Commit

Permalink
HCR Failure pop up alignment changes
Browse files Browse the repository at this point in the history
This commit aligns all checkbox options in HCR failure box to Left and
other buttons to center
  • Loading branch information
SougandhS authored and jukzi committed Jan 21, 2025
1 parent de09812 commit 8767c15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2024 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -90,15 +90,14 @@ protected Control createDialogArea(Composite parent) {
* configuration data.
*/
private Button createCheckButton(Composite parent, String label) {
Button button= new Button(parent, SWT.CHECK | SWT.LEFT);
Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
button.setText(label);

GridData data = new GridData(SWT.NONE);
data.horizontalIndent = 40;
data.horizontalSpan = 2;
data.horizontalAlignment= GridData.CENTER;
data.horizontalAlignment = GridData.BEGINNING;
button.setLayoutData(data);
button.setFont(parent.getFont());

return button;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2024 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -26,6 +26,7 @@
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
Expand Down Expand Up @@ -63,6 +64,10 @@ protected void createButtonsForButtonBar(Composite parent) {
getButton(IDialogConstants.OK_ID).setText(DebugUIMessages.HotCodeReplaceErrorDialog_0);
boolean canTerminate= target.canTerminate();
boolean canDisconnect= target.canDisconnect();
GridData data = new GridData(SWT.CENTER);
data.horizontalAlignment = GridData.CENTER;
data.horizontalSpan = 2;
parent.setLayoutData(data);
if (canTerminate) {
createButton(parent, TERMINATE_ID, DebugUIMessages.HotCodeReplaceErrorDialog_1, false);
}
Expand All @@ -81,11 +86,10 @@ protected void createButtonsForButtonBar(Composite parent) {
*/
@Override
protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
Button button= super.createButton(parent, id, label, defaultButton);
Button button = super.createButton(parent, id, label, defaultButton);
blockMnemonicWithoutModifier(button);
return button;
}

/**
* Ensures that simple key presses don't activate the given button.
*
Expand Down

0 comments on commit 8767c15

Please sign in to comment.