1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Bug 465963 - Changing "Variable text font" preference has no effect

This commit is contained in:
Mikhail Khodjaiants 2015-04-30 12:16:25 -04:00
parent 2c70025486
commit 6d6666df33

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.dsf.debug.ui.viewmodel.variable;
import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelFont; import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelFont;
import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.FontData;
/** /**
* @since 2.0 * @since 2.0
@ -22,4 +23,11 @@ public class VariableLabelFont extends LabelFont {
public VariableLabelFont() { public VariableLabelFont() {
super(JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0]); super(JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0]);
} }
@Override
public FontData getFontData() {
// Requesting the font descriptor from JFaceResources every time when this method is called
// guarantees that changes made in the Preferences dialog will be applied.
return JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0];
}
} }