| Summary: | [Preferences] The width of the button in the perspectives page doesn't extend when the dialog font is changed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Hiroyuki Inaba <hiroyuki.inaba> | ||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P5 | CC: | Tod_Creasey | ||||
| Version: | 3.1.1 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Hiroyuki Inaba
Created attachment 31931 [details]
perspective.png
Please see "Make Default" button.
The attachment screenshot is a japanese screen.
I corrected it as follows; - In createVerticalButton method, setButtonLayoutData method was called after setFont method. button.setFont(parent.getFont()); /*Add*/ setButtonLayoutData(button); You need to reopen after font changes. This phenomenon reproduces it though the dialog was opened again.
The problem is to set the font of the button after setting the width of the button.
The width of the button is set depending on the setButtonLayoutData method.
In the setButtonLayoutData method, width has been decided according to the font and the text of the button.
Therefore, even if the font is set after width is decided, width is not correctly calculated.
It is necessary to set the font before the setButtonLayoutData method is called.
protected Button createVerticalButton(Composite parent, String label,
boolean defaultButton) {
Button button = new Button(parent, SWT.PUSH);
button.setText(label);
GridData data = setButtonLayoutData(button);
data.horizontalAlignment = GridData.FILL;
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
verticalButtonPressed(event.widget);
}
});
button.setToolTipText(label);
if (defaultButton) {
Shell shell = parent.getShell();
if (shell != null) {
shell.setDefaultButton(button);
}
}
problem> button.setFont(parent.getFont());
return button;
}
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |