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:
parent
d533adec3c
commit
0215bdc330
1 changed files with 9 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue