Lines 27-32
Link Here
|
27 |
import org.eclipse.swt.widgets.Widget; |
27 |
import org.eclipse.swt.widgets.Widget; |
28 |
|
28 |
|
29 |
import org.eclipse.jface.dialogs.IDialogConstants; |
29 |
import org.eclipse.jface.dialogs.IDialogConstants; |
|
|
30 |
import org.eclipse.jface.resource.JFaceResources; |
30 |
import org.eclipse.jface.util.Assert; |
31 |
import org.eclipse.jface.util.Assert; |
31 |
|
32 |
|
32 |
/** |
33 |
/** |
Lines 111-116
Link Here
|
111 |
* Returns a width hint for a button control. |
112 |
* Returns a width hint for a button control. |
112 |
*/ |
113 |
*/ |
113 |
public static int getButtonWidthHint(Button button) { |
114 |
public static int getButtonWidthHint(Button button) { |
|
|
115 |
if (button.getFont().equals(JFaceResources.getDefaultFont())) |
116 |
button.setFont(JFaceResources.getDialogFont()); |
114 |
if (fgHorizontalDialogUnitSize == 0.0) { |
117 |
if (fgHorizontalDialogUnitSize == 0.0) { |
115 |
initializeDialogUnits(button); |
118 |
initializeDialogUnits(button); |
116 |
} |
119 |
} |
Lines 122-127
Link Here
|
122 |
* Returns a height hint for a button control. |
125 |
* Returns a height hint for a button control. |
123 |
*/ |
126 |
*/ |
124 |
public static int getButtonHeigthHint(Button button) { |
127 |
public static int getButtonHeigthHint(Button button) { |
|
|
128 |
if (button.getFont().equals(JFaceResources.getDefaultFont())) |
129 |
button.setFont(JFaceResources.getDialogFont()); |
125 |
if (fgHorizontalDialogUnitSize == 0.0) { |
130 |
if (fgHorizontalDialogUnitSize == 0.0) { |
126 |
initializeDialogUnits(button); |
131 |
initializeDialogUnits(button); |
127 |
} |
132 |
} |