Bug 121367 - [Preferences] The width of the button in the perspectives page doesn't extend when the dialog font is changed
Summary: [Preferences] The width of the button in the perspectives page doesn't extend...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-12-19 02:48 EST by Hiroyuki Inaba CLA
Modified: 2021-11-09 20:00 EST (History)
1 user (show)

See Also:


Attachments
perspective.png (65.60 KB, image/png)
2005-12-19 02:50 EST, Hiroyuki Inaba CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroyuki Inaba CLA 2005-12-19 02:48:02 EST
The width of the button in the General > Perspectives page of Preferences
doesn't extend when the dialog font is changed. 

The problem is included in the source code of the following packages. 

package org.eclipse.ui.internal.dialogs
	class PerspectivesPreferencePage
Comment 1 Hiroyuki Inaba CLA 2005-12-19 02:50:20 EST
Created attachment 31931 [details]
perspective.png

Please see "Make Default" button.
The attachment screenshot is a japanese screen.
Comment 2 Hiroyuki Inaba CLA 2005-12-22 20:47:27 EST
I corrected it as follows;

- In createVerticalButton method, setButtonLayoutData method was called after
setFont method.

		button.setFont(parent.getFont());

/*Add*/		setButtonLayoutData(button);
Comment 3 Tod Creasey CLA 2007-06-13 16:01:55 EDT
You need to reopen after font changes.
Comment 4 Hiroyuki Inaba CLA 2007-06-23 00:41:09 EDT
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;
	}
Comment 5 Susan McCourt CLA 2009-07-09 19:27:49 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:10:34 EDT
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.
Comment 7 Eclipse Genie CLA 2021-11-09 20:00:03 EST
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.