Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 2584 Details for
Bug 27386
A Control should inherit the font of its parent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
other OS' patch
other.txt (text/plain), 3.27 KB, created by
Sebastian Davids
on 2002-11-29 09:59:17 EST
(
hide
)
Description:
other OS' patch
Filename:
MIME Type:
Creator:
Sebastian Davids
Created:
2002-11-29 09:59:17 EST
Size:
3.27 KB
patch
obsolete
>Index: Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.39 >diff -u -r1.39 Control.java >--- Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java 8 Nov 2002 21:25:16 -0000 1.39 >+++ Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java 29 Nov 2002 14:22:55 -0000 >@@ -428,7 +428,11 @@ > * the programmer provides. The initial value of the cache is > * the default font for the widget. > */ >- font = defaultFont (); >+ if (parent == null) { >+ font = defaultFont (); >+ } else { >+ font = Font.carbon_new(getDisplay (), Display.getThemeFont (parent.font.handle.fID)); >+ } > > /* > * Explicitly set the tab ordering for XmTAB_GROUP widgets to >Index: Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.96 >diff -u -r1.96 Control.java >--- Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 13 Nov 2002 22:50:16 -0000 1.96 >+++ Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 29 Nov 2002 14:22:53 -0000 >@@ -1336,7 +1336,11 @@ > public Font getFont () { > checkWidget(); > if (font != null) return font; >- return Font.gtk_new (getDisplay (), defaultFont ()); >+ if (parent == null) { >+ return Font.gtk_new (getDisplay (), defaultFont ()); >+ } else { >+ return Font.gtk_new (getDisplay (), OS.pango_font_description_copy (parent.getFontDescription())); >+ } > } > > int getFontDescription () { >Index: Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.67 >diff -u -r1.67 Control.java >--- Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java 26 Nov 2002 16:44:42 -0000 1.67 >+++ Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java 29 Nov 2002 14:22:52 -0000 >@@ -468,7 +468,11 @@ > * the programmer provides. The initial value of the cache is > * the default font for the widget. > */ >- font = defaultFont (); >+ if (parent == null) { >+ font = defaultFont (); >+ } else { >+ font = Font.motif_new (getDisplay (), parent.font.handle); >+ } > } > int defaultBackground () { > return getDisplay ().defaultBackground; >Index: Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.52 >diff -u -r1.52 Control.java >--- Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java 30 Oct 2002 19:44:44 -0000 1.52 >+++ Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java 29 Nov 2002 14:22:56 -0000 >@@ -1982,8 +1982,12 @@ > } > > void setDefaultFont () { >- Display display = getDisplay (); >- if (display.defaultFont != null) setFont (defaultFont ()); >+ if (parent == null) { >+ Display display = getDisplay (); >+ if (display.defaultFont != null) setFont (defaultFont ()); >+ } else { >+ setFont(parent.getFont()); >+ } > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27386
:
2583
| 2584