Bug 21870 - Coolbar - platform wrapping should not change item sizes
Summary: Coolbar - platform wrapping should not change item sizes
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-24 15:14 EDT by Lynne Kues CLA
Modified: 2004-06-28 12:15 EDT (History)
0 users

See Also:


Attachments
test case jar (5.56 KB, application/octet-stream)
2002-07-24 15:15 EDT, Lynne Kues CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lynne Kues CLA 2002-07-24 15:14:30 EDT
Build 200207161002

1. Run the attached test case.
2. Size the window slightly smaller horizontally so that the Open Type (last 
cool item) gets wrapped to the next row.

Notice that the first cool item on the first row is resized bigger.  Also 
notice how flashy the auto wrapping is as you size the window smaller.  You can 
actually see the items being moved to the left than back to the right.
Comment 1 Lynne Kues CLA 2002-07-24 15:15:28 EDT
Created attachment 1733 [details]
test case jar
Comment 2 Felipe Heidrich CLA 2002-07-24 16:38:32 EDT
All this flash is because there are two resize listeners on the CoolBar.
One is the GridLayout added to the composite and another is a extra resize 
listener.
Looks like the first listener resize the CoolBar bigger causing the item move 
to the right and then the second listener resize the CoolBar smaller again 
causing the item return to the left.

Try change to example like this:
a) Get rid of the extra resizeListener
b) Replace the GridLayout on the composite by a FillLayout



Comment 3 Felipe Heidrich CLA 2002-08-08 10:11:40 EDT
Lynne, the same behavior can be verified on IE.
There are no SWT code doing or causing this.

It's a platform behavior.
Note that when the coolbar is resized bigger again all the coolitem return the 
correct size.

Reopen this pr in case I have misunderstood something.
Comment 4 Lynne Kues CLA 2002-08-08 10:37:00 EDT
This bug causes a problem when you resize the window for Perspective "A" 
smaller, which causes the coolitems to wrap and be sized incorrectly as this PR 
indicates, and then switch to another perspective.  As part of switching to 
another perspective, the coolbar layout is saved for Perspective "A" (including 
the incorrect cool item sizes).  When you switch back to Perspective "A", which 
restores the saved coolbar layout, and resize the window larger, the coolitems 
are NOT returned to their correct size since the layout was saved with the 
incorrect sizes.  I don't see how I can work around this.
Comment 5 Felipe Heidrich CLA 2004-06-28 12:15:14 EDT
For the flashing on the coolbar we already have Bug17994.

About the problem retrieving the sizes I can't help, the API getSizes is doing 
what it is suppose to do: returns the current size of coolitems. Probably the 
fix for you would be throw away the sizes if the workbench is resized or if 
the coolbar wraps. Anyway, Eclipse 3.0 always reset the coolbar size in 
perspective switch so this is no longer a problem.