Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2002-11-13 18:26:30 -0500
committerSilenio Quarti2002-11-13 18:26:30 -0500
commit9908ca49465a6564b452d9c790bffd85cacdcfd0 (patch)
tree6a0582b998b541a6a03d9c3e79206d9c13eae63c
parent81195198ca3a58eafc092c73c97d7552ea882688 (diff)
downloadeclipse.platform.swt-M3_version_2_1.tar.gz
eclipse.platform.swt-M3_version_2_1.tar.xz
eclipse.platform.swt-M3_version_2_1.zip
backport to M3_version_2_1 PR26121v2116bM3_version_2_1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 7a9f45cfae..37f024f662 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -33,6 +33,7 @@ public abstract class Control extends Widget implements Drawable {
int fixedHandle, imHandle;
Composite parent;
Menu menu;
+ Font font;
String toolTipText;
Object layoutData;
Accessible accessible;
@@ -1326,7 +1327,8 @@ public boolean getEnabled () {
*/
public Font getFont () {
checkWidget();
- return Font.gtk_new (getDisplay (), getFontDescription ());
+ if (font != null) return font;
+ return Font.gtk_new (getDisplay (), defaultFont ());
}
int getFontDescription () {
@@ -1754,7 +1756,7 @@ public int internal_new_GC (GCData data) {
data.device = getDisplay ();
data.background = background;
data.foreground = foreground;
- data.font = style.font_desc;
+ data.font = font != null ? font.handle : defaultFont ();
}
return gdkGC;
}
@@ -2171,6 +2173,7 @@ public boolean setFocus () {
*/
public void setFont (Font font) {
checkWidget();
+ this.font = font;
int fontDesc;
if (font == null) {
fontDesc = defaultFont ();

Back to the top