1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 09:45:39 +02:00

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

Change-Id: Ibe7dc5a5dbdbdd698f13094f220bf00255ad6221
This commit is contained in:
Mikhail Khodjaiants 2015-04-30 12:43:39 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent d533adec3c
commit 0215bdc330

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.debug.ui.IDebugUIConstants;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.FontData;
/**
* @since 2.0
@ -20,6 +21,13 @@ import org.eclipse.jface.resource.JFaceResources;
public class VariableLabelFont extends LabelFont {
public VariableLabelFont() {
super(JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0]);
super(JFaceResources.getFontRegistry().getFontData(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT)[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.getFontRegistry().getFontData(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT)[0];
}
}