All,
I updated the bugreport to bug #28739
https://bugs.eclipse.org/bugs/show_bug.cgi?id=28739
to include more recent versions of eclipse. To apply the patch, the
following should work (please check for line wraps your mail clientmay
have introduced). You
Comments are welcome and please vote on this bug. IMO, it is one of the
most serious usability issues on OSX at the moment.
Cheers, Anjo
---cd eclipse*/esclipse*; unzip ./plugins/org.eclipse.platform.macosx.carbon.source_2.1.1/src/ org.eclipse.swt.carbon_2.1.1/ws/carbon/swtsrc.zip patch <<EOF diff -r -c3 org/eclipse/swt/graphics/Device.java org/eclipse/swt/graphics/Device.java *** org/eclipse/swt/graphics/Device.java Thu Mar 27 10:51:48 2003 --- org/eclipse/swt/graphics/Device.java Sun May 18 23:12:40 2003 *************** *** 492,511 **** COLOR_MAGENTA = new Color (this, 0xFF,0,0xFF); COLOR_CYAN = new Color (this, 0,0xFF,0xFF); COLOR_WHITE = new Color (this, 0xFF,0xFF,0xFF);
! /* Initialize the system font slot */ ! short id = OS.GetAppFont(); ! short style = (short)0; ! short size = OS.GetDefFontSize(); ! int[] font = new int[1]; ! if (OS.FMGetFontFromFontFamilyInstance(id, style, font, null) != 0) { ! SWT.error(SWT.ERROR_NO_HANDLES); ! } ! systemFont = Font.carbon_new (this, font[0], id, style, size); }
! /** ! * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Device</code>. It is marked public only so that it --- 492,541 ---- COLOR_MAGENTA = new Color (this, 0xFF,0,0xFF); COLOR_CYAN = new Color (this, 0,0xFF,0xFF);
COLOR_WHITE = new Color (this, 0xFF,0xFF,0xFF); + + systemFont = getDefaultFont();
! } ! /** ! *..eturn default base font used by all widgets. ! */ ! protected Font getDefaultFont() { ! Font defaultFont = null; ! ! if("false".equals(System.getProperty("SWTUsesSmallFonts"))) { ! /* Initialize the system font slot */ ! short id = OS.GetAppFont(); ! short style = (short)0; ! short size = OS.GetDefFontSize(); ! int[] font = new int[1]; ! if (OS.FMGetFontFromFontFamilyInstance(id, style, font, null) != 0) { ! SWT.error(SWT.ERROR_NO_HANDLES); ! } ! defaultFont = Font.carbon_new (this, font[0], id, style, size); ! } else { ! /* Initialize the system font by using the default small font */ ! byte [] family = new byte [256]; ! short [] size = new short [1]; ! byte [] style = new byte [1]; ! OS.GetThemeFont ((short) defaultThemeFont (), (short) OS.smSystemScript, family, size, style); ! short id = OS.FMGetFontFamilyFromName (family); ! int [] font = new int [1]; ! OS.FMGetFontFromFontFamilyInstance (id, style [0], font, null); ! defaultFont = Font.carbon_new (this, font [0], id, style [0], size [0]); ! } ! return defaultFont; ! } ! ! /** ! * Bottleneck routine for all the default fonts. ! *..eturn default theme font used by all widgets (should be small system font because all the others are too large on OSX). ! */ ! public int defaultThemeFont () { ! return OS.kThemeSmallSystemFont; }
! /** ! * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Device</code>. It is marked public only so that it diff -r -c3 org/eclipse/swt/widgets/Control.java org/eclipse/swt/widgets/ Control.java *** org/eclipse/swt/widgets/Control.java Thu Mar 27 10:52:36 2003 --- org/eclipse/swt/widgets/Control.java Sun May 18 23:11:22 2003 *************** *** 490,497 **** return display.getSystemColor (SWT.COLOR_BLACK); }
! int defaultThemeFont () { ! return OS.kThemeSystemFont; }
void deregister () { --- 490,497 ---- return display.getSystemColor (SWT.COLOR_BLACK); }
! int defaultThemeFont () { ! return getDisplay().defaultThemeFont(); }
void deregister () { diff -r -c3 org/eclipse/swt/widgets/Table.java org/eclipse/swt/widgets/Table.java *** org/eclipse/swt/widgets/Table.java Tue Mar 11 18:38:28 2003 --- org/eclipse/swt/widgets/Table.java Sun May 18 22:14:51 2003 *************** *** 330,339 **** return display.getSystemColor (SWT.COLOR_LIST_FOREGROUND); }
- int defaultThemeFont () { - return OS.kThemeViewsFont; - } - /** * Deselects the item at the given zero-relative index in the receiver. * If the item at the index was already deselected, it remains --- 330,335 ---- diff -r -c3 org/eclipse/swt/widgets/Tree.java org/eclipse/swt/widgets/Tree.java *** org/eclipse/swt/widgets/Tree.java Thu Apr 24 12:22:24 2003 --- org/eclipse/swt/widgets/Tree.java Sun May 18 22:14:23 2003 *************** *** 326,335 **** return display.getSystemColor (SWT.COLOR_LIST_FOREGROUND); }
- int defaultThemeFont () { - return OS.kThemeViewsFont; - } - /** * Deselects all selected items in the receiver. * --- 326,331 ---- EOF javac org/eclipse/swt/*.java org/eclipse/swt/*/*.java -d classes; cd classes && jar uf ../plugins/org.eclipse.swt.carbon_*/ws/carbon/swt.jar org/eclipse/swt/*/*.class && cd ..
Am Montag, 31.03.03 um 22:19 Uhr schrieb Anjo Krank:
> All, > > I just could not bear the ridicule of my peers - sob - any longer so I > set out for a quick-and-dirty solution: > > unpack > eclipse-SDK-I20030321-macosx-carbon_0/eclipse/plugins/ > org.eclipse.platform.macosx.carbon.source_2.1.0/src/ > org.eclipse.swt.carbon_2.1.0/ws/carbon/swtsrc.zip > > In org/eclipse/swt/widgets/Control.java change: > > int defaultThemeFont () { > return OS.kThemeSmallSystemFont; > } > > > then call: > > sh build.sh > mkdir classes > javac org/eclipse/swt/*.java org/eclipse/swt/*/*.java -d classes > cd classes && jar ufv > ../../eclipse-SDK-I20030321-macosx-carbon_0/eclipse/plugins/ > org.eclipse.swt.carbon_2.1.0/ws/carbon/swt.jar > org/eclipse/swt/widgets/Control.class && cd .. > > This at least changes the font size for the window headers. > Browser/Table/Tree size is next :) > > Cheers, Anjo > > Cheers, Anjo
This archive was generated by hypermail 2.0.0 : Sun May 18 2003 - 17:51:16 EDT