diff options
author | Carolyn MacLeod <carolyn> | 2008-03-05 04:13:00 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2008-03-05 04:13:00 +0000 |
commit | 4b4d246e11750716991a34062a013449ce7da49d (patch) | |
tree | aac074fe67c1316eed59d2ebd632c99ec0dd019a /bundles/org.eclipse.swt/Eclipse SWT/wpf | |
parent | 05be259fea5f957dd02645af0c5af88f8d90841d (diff) | |
download | eclipse.platform.swt-4b4d246e11750716991a34062a013449ce7da49d.tar.gz eclipse.platform.swt-4b4d246e11750716991a34062a013449ce7da49d.tar.xz eclipse.platform.swt-4b4d246e11750716991a34062a013449ce7da49d.zip |
move system font slot initialization into init() for consistency
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/wpf')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java index bcba3a3b16..1c35010ffa 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java @@ -107,17 +107,6 @@ public Device(DeviceData data) { } create (data); init (); - - /* Initialize the system font slot */ - int fontFamily = OS.SystemFonts_MessageFontFamily(); - int style = OS.SystemFonts_MessageFontStyle(); - int weight = OS.SystemFonts_MessageFontWeight(); - double size = OS.SystemFonts_MessageFontSize(); - int typeface = OS.gcnew_Typeface(fontFamily, style, weight, OS.FontStretches_Normal); - OS.GCHandle_Free(fontFamily); - OS.GCHandle_Free(style); - OS.GCHandle_Free(weight); - systemFont = Font.wpf_new(this, typeface, size); } } @@ -487,6 +476,17 @@ protected void init () { colors[SWT.COLOR_MAGENTA] = Color.wpf_new(this, OS.Colors_Magenta ()); colors[SWT.COLOR_CYAN] = Color.wpf_new(this, OS.Colors_Cyan ()); colors[SWT.COLOR_WHITE] = Color.wpf_new(this, OS.Colors_White ()); + + /* Initialize the system font slot */ + int fontFamily = OS.SystemFonts_MessageFontFamily(); + int style = OS.SystemFonts_MessageFontStyle(); + int weight = OS.SystemFonts_MessageFontWeight(); + double size = OS.SystemFonts_MessageFontSize(); + int typeface = OS.gcnew_Typeface(fontFamily, style, weight, OS.FontStretches_Normal); + OS.GCHandle_Free(fontFamily); + OS.GCHandle_Free(style); + OS.GCHandle_Free(weight); + systemFont = Font.wpf_new(this, typeface, size); } /** |