-
Notifications
You must be signed in to change notification settings - Fork 216
Newer Workspace Version popup dialog ui alignment changes. #2949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2003, 2020 IBM Corporation and others. | ||
* Copyright (c) 2003, 2025 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
|
@@ -56,6 +56,8 @@ | |
import org.eclipse.osgi.util.NLS; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.FillLayout; | ||
import org.eclipse.swt.layout.GridData; | ||
import org.eclipse.swt.widgets.Button; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Control; | ||
import org.eclipse.swt.widgets.Display; | ||
|
@@ -727,6 +729,17 @@ protected ReturnCode checkValidWorkspace(Shell shell, URL url) { | |
MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, title, null, message, severity, | ||
buttonLabelToId, 0, IDEWorkbenchMessages.IDEApplication_version_doNotWarnAgain, false) { | ||
@Override | ||
protected Control createDialogArea(Composite parent) { | ||
Composite composite = (Composite) super.createDialogArea(parent); | ||
Button toggle = getToggleButton(); | ||
if (toggle != null && !toggle.isDisposed()) { | ||
GridData toggleData = new GridData(SWT.BEGINNING, SWT.TOP, false, false); | ||
toggleData.horizontalIndent = 50; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you explain this "magic number"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was by trial and error, by only which i could arrive to this value to align it with the text(1st warning line text where it starts) in the above line. For reference -> #2949 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May this 50 be wrong on other OSes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have only windows to check on. Not sure though. |
||
toggle.setLayoutData(toggleData); | ||
} | ||
return composite; | ||
} | ||
@Override | ||
protected Shell getParentShell() { | ||
// Bug 429308: Make workspace selection dialog visible | ||
// in the task manager of the OS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the right place to fix this. Shouldn't we fix this in MessageDialogWithToggle?
So that for all the dialogs inheriting from this class the checkbox is aligned with the text and not with the icon?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking on this, will update you soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @BeckerWdf
I tried updating the method createToggleButton() as below in MessageDialogWithToggle.java(leaving createDialogArea() untouched) but it is not being honoured to correct the indentation of check box as required.
Do you have any other thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BeckerWdf : Can we merge this fix like this? if you dont have any further suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BeckerWdf : When you get some free time, can you check on this and if no further suggestions - can we merge this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for missing this.
MessageDialogWithToggle#createToggleButton
looks like this:
Wouldn't be more consistent from a UI point of view to add your changes there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried at this place as per my previous comment but didnt help. -> #2949 (comment)
To be specific i have tried as below::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this did not help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated above, the same change i have put in the 4.35 maintenance branch and built a complete eclipse local build. Installed and launched that eclipse to open a workspace used by 4.36 till then but the alignment is not corrected as per the code. The same is my observation in -> #2949 (comment)