aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2014-05-10 15:28:34 (EDT)
committerMarc-Andre Laperle2014-05-10 16:34:10 (EDT)
commit4697a58f0a3ea1a0b8cab8c841e547bfbe9ba5a1 (patch)
treea835e6d1b8944c14326337e6cd08fd9d60b60877
parent0658d789bfb0cb2ccab2ad6b8af953cadf626c1e (diff)
downloadeclipse.platform.swt-4697a58f0a3ea1a0b8cab8c841e547bfbe9ba5a1.zip
eclipse.platform.swt-4697a58f0a3ea1a0b8cab8c841e547bfbe9ba5a1.tar.gz
eclipse.platform.swt-4697a58f0a3ea1a0b8cab8c841e547bfbe9ba5a1.tar.bz2
Bug 421834 - Some bold text with Luna 4.4.M3/GTK3v4426fI20140513-2000I20140512-2000refs/changes/29/26329/2
Fix ExpandBar, Group, List, Spinner, ToolBar, Table and Tree inheriting font. Change-Id: I73e61aa3a172b50584ed76e01b6fb62b0c30b98f Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java5
7 files changed, 36 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index 7ba7f57..68e4f02 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
@@ -151,6 +151,11 @@ void createHandle (int index) {
OS.gtk_container_add (fixedHandle, handle);
}
OS.gtk_container_set_border_width (handle, 0);
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
void createItem (ExpandItem item, int style, int index) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
index cbcdd70..be81487 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
@@ -158,6 +158,11 @@ void createHandle(int index) {
if ((style & SWT.SHADOW_ETCHED_OUT) != 0) {
OS.gtk_frame_set_shadow_type (handle, OS.GTK_SHADOW_ETCHED_OUT);
}
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index 93cddac..00a6a0d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -231,6 +231,11 @@ void createHandle (int index) {
if ((getShell ().style & SWT.ON_TOP) != 0) {
OS.gtk_tree_view_set_search_column (handle, -1);
}
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index 3b66cad..62c1f46 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
@@ -327,6 +327,11 @@ void createHandle (int index) {
if (OS.GTK3) {
imContext = OS.imContextLast();
}
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 1d8df7e..1d79800 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -830,6 +830,11 @@ void createWidget (int index) {
items = new TableItem [4];
columns = new TableColumn [4];
itemCount = columnCount = 0;
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
GdkColor defaultBackground () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 2631097..fe6cabf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -163,6 +163,12 @@ void createHandle (int index) {
* when the tool bar item has no image or text.
*/
OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR);
+
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 41c6bf2..2a40869 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -930,6 +930,11 @@ void createWidget (int index) {
items = new TreeItem [4];
columns = new TreeColumn [4];
columnCount = 0;
+ // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
+ // reset to default font to get the usual behavior
+ if (OS.GTK3) {
+ setFontDescription(defaultFont().handle);
+ }
}
GdkColor defaultBackground () {