Bug 34245 - [Preferences] DBCS: "Use System Font" button truncated
Summary: [Preferences] DBCS: "Use System Font" button truncated
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-Motif
: P3 normal (vote)
Target Milestone: 2.1.1   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 35165 35166 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-10 02:30 EST by Masayuki Fuse CLA
Modified: 2003-05-19 00:14 EDT (History)
5 users (show)

See Also:


Attachments
Proposed patch (4.43 KB, patch)
2003-05-08 09:54 EDT, Tod Creasey CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masayuki Fuse CLA 2003-03-10 02:30:16 EST
Driver: RC2
Platform : RedHat 8.0 Professional, motif, gtk2.2.1
locale : ja_JP.eucjp, ko_KR.euckr, zh_CN.gb18030, zh_TW.big5 

Steps
get into Preferences - Workbench - Fonts
The button "Use System font" is truncated on motif, most of it isn't shown on 
gtk.
Comment 1 Tod Creasey CLA 2003-03-12 09:30:20 EST
I have replicated this but not consistently so I am having a hard time tracing
it. The problem is that we appear to not be getting the resize serviced by SWT
and the dialog is not resizing as a result.

Fuse-san do you get these errors to your terminal?


(process:2028): Gdk-WARNING **: locale not supported by C library

(process:2028): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
bash-2.05b$ ./eclipse

(process:2191): Gdk-WARNING **: locale not supported by C library

(process:2191): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Comment 2 Nick Edgar CLA 2003-03-12 12:24:29 EST
Should move this to SWT if it looks like an SWT problem.
Comment 3 Tod Creasey CLA 2003-03-12 12:39:20 EST
The scenario is that the resize is not occuring on the Dialog in Japanese on 
Motif and GTK. This only occurs when I have opened the dialog for the first 
time - if I do it again later on in my session I do not have this problem.

Also note that I cannot replicate this self hosted.
Comment 4 Veronika Irvine CLA 2003-03-12 15:01:14 EST
Approved for RC3 by Veronika.
Comment 5 Veronika Irvine CLA 2003-03-12 15:38:12 EST
Approved by Mike for RC3.
Comment 6 Masayuki Fuse CLA 2003-03-13 00:03:25 EST
Tod,
No, I didn't get these messages.
Comment 7 Grant Gayed CLA 2003-03-14 12:06:06 EST
Tod showed me the problem on his machine.  I cannot reproduce it here, though I 
think my setup is matching his.  Will revisit later.
Comment 8 Tod Creasey CLA 2003-03-18 09:42:17 EST
*** Bug 35165 has been marked as a duplicate of this bug. ***
Comment 9 Tod Creasey CLA 2003-03-18 09:43:22 EST
*** Bug 35166 has been marked as a duplicate of this bug. ***
Comment 10 Grant Gayed CLA 2003-03-18 17:54:44 EST
Note that based on the provided screen shots bug 35165 and bug 35166 aren't 
actually duplicates of this problem.  These are simply cases of the preferences 
dialog stretching to the full screen width but being unable to lay out all of 
the widgets.  I saw these same issues on our GB18030 machine, but the dialog 
did in fact grow to fill the available screen width.

Removing the RC3 tag from this report since it could not be resolved in time 
for tonight's RC3 build.
Comment 11 Masayuki Fuse CLA 2003-03-28 02:32:00 EST
I've tried to run RC3a on RedHat 9 that is golden.
Only motif on zh_TW locale has this error. All of other locales for motif and
gtk do no have this error. 
Comment 12 Felipe Heidrich CLA 2003-05-07 17:01:46 EDT
This is a duplicate of 31278.  Normally I would just mark it as such but this 
PR is under consideration for 2.1.1.  Kevin?
Comment 13 Felipe Heidrich CLA 2003-05-07 17:33:14 EDT
FH and SN experimented comparing two strings of 3 characters.  One 
contained, "mmm" and the other contained 3 Chinese characters.  If the dialog 
in question were to be composed of all Chinese characters, the dialog would 
need to be larger than the screen to show all the characters.  The window 
manager prevents this so the characters are clipped.

Also, we stepped through the code that was computing the average character 
width and the code was taking an evenly weighted average of English and 
Chinese.  If it were it "correctly" take into account that there are more 
Chinese characters than English, the average would be even bigger.  One 
possibility is to use the character width of an English character to calculate 
widths.

So, I'm not sure what SWT can do about this.  Perhaps the dialog layout could 
be rewritten to use the extra space above the three buttons?
Comment 14 Tod Creasey CLA 2003-05-08 09:14:03 EDT
I have verified that it is the size of the font that makes the difference and 
that on Motif the widths that OS provides are excessive. I think we are stuck 
with just reorganizing this dialog.
Comment 15 Tod Creasey CLA 2003-05-08 09:54:34 EDT
Created attachment 4823 [details]
Proposed patch
Comment 16 Tod Creasey CLA 2003-05-08 11:07:29 EDT
Reassigning to me. I have tested the supplied patch with a variety of fonts in 
both Japanese and English and the new layout does not have the problems with 
the size calculations.

I would like to submit this for 2.1.1 subject to approval from Nick and Kevin.
Comment 17 Kevin Haaland CLA 2003-05-09 09:02:27 EDT
+1
Comment 18 Tod Creasey CLA 2003-05-09 09:41:23 EDT
Released in 2.1.1 stream 
Comment 19 Masayuki Fuse CLA 2003-05-19 00:14:22 EDT
verified in M20030515