Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337351

Summary: [win] Builds view columns flicker when resizing on windows
Product: z_Archived Reporter: Eike Stepper <stepper>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: shawn.minto, torkildr
Version: unspecified   
Target Milestone: 0.7   
Hardware: All   
OS: Windows 7   
Whiteboard:

Description Eike Stepper CLA 2011-02-16 15:06:44 EST
I tried to resize the first cloumn but somehow the third one (the right-aligned one) incorrectly interferes and creates strange flickering. Resize of the first column does not happen
Comment 1 Torkild Resheim CLA 2011-02-17 06:16:45 EST
This is probably due to the automatic scaling of columns. I'll have a look.
Comment 2 Steffen Pingel CLA 2011-02-17 15:04:45 EST
I also noticed that the Builds column is very narrow when starting with a clean workspace. Can we make that a little wider by default?
Comment 3 Torkild Resheim CLA 2011-02-28 15:31:15 EST
I'm not quite sure what to do with this issue. The flickering is due to the automatic resize of columns. Since it will always adapt to the minimum size required to show all contents there should be no reason to manually resize. However as we can see, users expect this to work. We could add a preference setting to disable this feature. Or we could implement a clever way of detecting that manual resize has taken place and turn off the automatic resize for the remainder of the session. Any ideas?
Comment 4 Eike Stepper CLA 2011-03-01 00:58:04 EST
Hmm, I don't know the code involved, so I can only argue from a user's perspective. If there is no way to provide the automatic column resize without flickering then I'd prefer to switch off automatic resize entirely. Note that the main problem for a user is not the flickering but rather that a resize is not possible at all.

On the other hand I can hardly imagine that it is not possible to program automatic column resize properly. Can you explain in brief how your mechanism is supposed to work? Imagine we have 4 columns A, B, C and D of a table T that currently have some concrete sizes sA, sB, sC and sD, such that

   sA + sB + sC + sD == sT

Now I start dragging the right border of column B to make it wider. I expect that sA stays unchanged (so does the left border of B). C and D must accomodate for the decreased remaining size

   x := sT - sA - sB

possibly by keeping their original ratio:

   sC' := x * sC / (sC + sD)
   sD' := x * sD / (sC + sD)

Is that correct?
How are minimum column sizes related?
Are all other possible automatic resize mechanisms disabled?
Comment 5 Steffen Pingel CLA 2011-03-01 01:01:20 EST
Thanks for looking into it. I don't see the flickering problem on Gtk at all. Columns are properly resized and extend out of view if as expected when dragging them far enough to right side. Would be great if we could make it work the same way on Windows.
Comment 6 Torkild Resheim CLA 2011-03-06 15:38:38 EST
Looks good on OS X too. So I decided to set up a dev environmen on Windows 7. However I ran into some trouble with the target platform. Looks like bug #323526. Several dependecies are not downloaded so I'm unable to get Mylyn Builds to actually build. Working on finding a way around this. Sorry about the delay.
Comment 7 Steffen Pingel CLA 2011-03-10 21:34:43 EST
I have simplified the implementation to only resize on collapse and expand and when the size of the tree's parent changes, i.e. when the view is resized. It's now possible to make columns smaller or larger than the view which can cause a scrollbar to appear until the tree is auto resized again. This may be against the original intention but it seems to work much more smoothly on Windows.

A new build is under way: https://hudson.eclipse.org/hudson/job/mylyn-release/73/ . Eike, please reopen if you still have trouble with that build.
Comment 8 Torkild Resheim CLA 2011-03-13 17:04:16 EDT
Thanks Steffen. Not quite as intended but close enough.
Comment 9 Steffen Pingel CLA 2011-03-13 17:39:16 EDT
Just to clarify, the changes I made were to get it working for the release. I am happy to change this back to the original behavior in the next version if we can figure out a way to make it work on windows without flickering.
Comment 10 Torkild Resheim CLA 2011-04-02 17:56:00 EDT
OK. I'll commence setting up the dev environment on Windows 7 and do some debugging.