Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 169698 - Link.pack() incorrectly setting size on Linux
Summary: Link.pack() incorrectly setting size on Linux
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 166363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-05 11:14 EST by Anibal Maffioletti de Deus CLA
Modified: 2013-07-15 04:25 EDT (History)
7 users (show)

See Also:


Attachments
Snippet showing the bug described (784 bytes, text/plain)
2007-01-05 11:15 EST, Anibal Maffioletti de Deus CLA
no flags Details
Picture showing the bug described (15.15 KB, image/jpeg)
2007-01-05 11:18 EST, Anibal Maffioletti de Deus CLA
no flags Details
c test case (1.18 KB, text/plain)
2007-05-07 18:04 EDT, Felipe Heidrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anibal Maffioletti de Deus CLA 2007-01-05 11:14:52 EST
Build ID: M20060921-0945

Steps To Reproduce:
1. Create a Link and set a text, like "First | Previous | Next | Last"
2. Use Link.pack() to set the size of the Link component
Comment 1 Anibal Maffioletti de Deus CLA 2007-01-05 11:15:37 EST
Created attachment 56465 [details]
Snippet showing the bug described
Comment 2 Anibal Maffioletti de Deus CLA 2007-01-05 11:18:13 EST
Created attachment 56466 [details]
Picture showing the bug described

Look that in Linux, the "Last" word is not displayed.
Comment 3 Grant Gayed CLA 2007-01-05 14:12:52 EST
Note that the amount that this is off by may be dependent on the gtk version, because when I initially tried this snippet on my rhel4 (gtk 2.4.13) only one pixel of width was clipped from the right side.
Comment 4 Anibal Maffioletti de Deus CLA 2007-01-05 14:37:21 EST
If it helps, I'm using an out-of-the-box install of Ubuntu 6.10 with Gnome 2.16.1
Comment 5 Steve Northover CLA 2007-01-10 15:46:21 EST
Felipe, is the link clipped for you?
Comment 6 Felipe Heidrich CLA 2007-01-22 11:28:58 EST
works for me with GTK 2.8.20 GTK 2.10.1
What is GTK version and Pango version that gnome 2.16 is using?

The default font for the Link widget in my machine is Sans 11, what do yo have on your machine ?
add to your snippet:
System.out.println (link.getFont().getFontData()[0]);

Can you test with different fonts? more maybe changing the AA mode ?
Comment 7 Anibal Maffioletti de Deus CLA 2007-01-22 11:47:15 EST
System.out.println (link.getFont().getFontData()[0]) returns to me:
1|Sans|10|0|GTK|1|

The GTK version installed is: 2.10.6-0ubuntu1
The Pango version installed is: 1.14.5-0ubuntu1
Comment 8 Felipe Heidrich CLA 2007-01-24 11:28:44 EST
works for me with gtk-2.10.1, pango-1.13.3, and cairo 1.2.0

Bogdan, can you try this out ?

Anibal, what is your locale ? I try it on en_US.UTF-8 and pt_BR.UTF-8 (I'm guessing you speak portugues).
Comment 9 Anibal Maffioletti de Deus CLA 2007-01-24 12:33:15 EST
Complementing:

The Cairo version installed is: 1.2.4-1ubuntu2
The Locale is: en_US.UTF8

Now I'm updating Ubuntu to see if the problems get fixed (I saw that there are new versions on Ubuntu repositories of the libs you asked me).
Comment 10 Anibal Maffioletti de Deus CLA 2007-01-24 13:40:35 EST
GTK Version: 2.10.6-0ubuntu3 (updated)
Sun JDK Version 1.5.0_10 & 1.6.0 (b105)

Problem keep happening :(
Comment 11 Felipe Heidrich CLA 2007-05-07 15:23:27 EDT
*** Bug 166363 has been marked as a duplicate of this bug. ***
Comment 12 Felipe Heidrich CLA 2007-05-07 17:48:23 EDT
Bogdan has this problem on this machine running with:
gtk 2.10.4 + cairo 1.2.4
gtk 2.10.11 + cairo 1.2.6

On my machine it works with:
gtk 2.10.12 + cairo 1.2.0 + pango 1.16.4

I'm guessing cairo 1.2.4 intruduced a bug in pango 

I'm afraid this can be related to 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=123425
https://bugs.freedesktop.org/show_bug.cgi?id=5200
Comment 13 Felipe Heidrich CLA 2007-05-07 18:04:32 EDT
Created attachment 66224 [details]
c test case

this is c test case, I would like to know if it fails when running on a new version of cairo.
I could not get cairo cause cairographics.org is down right now.
Comment 14 Felipe Heidrich CLA 2007-05-08 14:10:01 EDT
works for me with gtk 2.10.12 + cairo 1.4.6 + pango 1.16.4

if you update your machine to the lastest stable version the problem should go away.
Comment 15 Felipe Heidrich CLA 2007-07-04 14:25:06 EDT
Anibal: Did you have the chance to test my c test case to to update the gtk/cairo/pango libraries in your system ?

Do you still have the problem ?
Comment 16 Felipe Heidrich CLA 2007-07-04 14:26:09 EDT
"Anibal: Did you have the chance to test my c test case to to update the
gtk/cairo/pango libraries in your system ?"

I'm sorry, I meant:
"Anibal: Did you have the chance to test my c test case OR to update the
gtk/cairo/pango libraries in your system ?"

Comment 17 Anibal Maffioletti de Deus CLA 2007-07-16 12:24:58 EDT
Sorry, but I'm not testing on Linux anymore. I'm finishing the product for initial release and in the first moment it will run only on Windows machines. After all the problems I faced, I decided that we will choose a Linux distro to be the 'supported' one by my team. But as soon as I can (read this week) I will download a fresh version of Ubuntu and test you patch.
Thank you.
Comment 18 Felipe Heidrich CLA 2007-07-16 14:18:59 EDT
Okay, I'm convienced this is a problem with cairo 1.2.4 and 1.2.6 (works on cairo 1.4.x).
Please reopen this report if you see this problem in the newer releases of cairo. Thanks
Comment 19 Markus Keller CLA 2013-07-11 10:56:26 EDT
See bug 393602 for follow-ups.