Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351230 - Odd view tab resizing
Summary: Odd view tab resizing
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.2 M4   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 15:08 EDT by Andrew Overholt CLA
Modified: 2011-12-08 15:08 EST (History)
1 user (show)

See Also:


Attachments
sequence of resizing workbench window's effect on view tab (19.04 KB, image/png)
2011-07-05 15:08 EDT, Andrew Overholt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Overholt CLA 2011-07-05 15:08:10 EDT
Created attachment 199145 [details]
sequence of resizing workbench window's effect on view tab

Build:  Eclipse 4.1 (I20110620-1631) on Linux (Fedora 15 x86_64) Gtk (2.24.4)

If I play with the width of my Eclipse 4.1 window, the outline view tab shrinks in odd ways.  I'll attach an illustrative screenshot.  I took a short video but it seems to have dropped some frames so it's probably not as useful as I'd hoped (and I don't know if the viewer of this bug can view webm videos :) :

  http://fedorapeople.org/~overholt/tabresize.webm

I've looked at the behaviour of other applications:

Firefox
- tabs never get smaller than a certain width
- entire window shrinks to almost 0 pixels wide

Empathy
- tabs never shrink to smaller than a certain width
- number of tabs visible depends on width of window
- window cannot be shrunk to smaller than minimum width of one tab
Comment 1 Oleg Besedin CLA 2011-07-07 12:01:31 EDT
On Windows 7 the Outline seems to have a minimum size beyond which it won't shrink, but on Mac I see exactly the same behavior as in your video.

(In reply to comment #0)
> (and I don't know if the viewer of this bug can view webm videos :) :

Seems to be fine with Firefox, thanks for making this video - otherwise it would have been hard to understand.
Comment 2 Eric Moffatt CLA 2011-09-15 12:52:52 EDT
M2 is done...
Comment 3 Andrew Overholt CLA 2011-10-04 15:20:11 EDT
Still happening for me with 4.2M2 on Linux Gtk.
Comment 4 Eric Moffatt CLA 2011-10-05 13:53:55 EDT
This is likely connected to our (lack of) use of CTF's 'setMinimumCharacters' API. IIRC in 3.x it's set to 1 for ViewStacks and some larger value for editor stacks.

We should at least see if setting the default value to '1' when a stack that is *outside* the shared area is rendered (and some other larger number otherwise).
Comment 5 Andrew Overholt CLA 2011-11-04 09:34:31 EDT
Eric says to set this to M4.  He also thinks it's an SWT issue :)
Comment 6 Eric Moffatt CLA 2011-11-08 15:49:59 EST
I've just tried setting the min characters to 1 (and 0). While the resizing works as expected if there's enough room for at least one tab to be drawn within the given settings we can still resize the stack horizontally to the point where the tab disappears (a la Andrew's image).

Not really sure what to do here. I could try to constrain the minimum width of a stack but really don't know when it should stop shrinking (i.e. I can't really detect when we're in the situation described here).

I'm going to use this defect for now to at least commit the changes to set the minimum chars to 1. I'll check with Bogdan to see what else we can do...
Comment 7 Eric Moffatt CLA 2011-11-09 09:39:06 EST
Pushed in >20111109.

commit 43046783b41c805748d62cec80bd87f36bbb05e1

This should get us much closer to the 3.x behavior. CTF's inside the editor area show at least 15 chars and only 1 if they aren't in the shared area.

It also adjusts the 'setUnselectedCloseVisible' to get back even more space in stacks outside the shared area (i.e. 'view' stacks).

Andrew, I'm going to close this even though your original scenario still exists. I went over it with Bogdan and we can demonstrate the same behavior in 3.x; when there just isn't enough pixels to show even one tab there really isn't much we can do...this is a case of DIH ("Doctor it hurts..."), don't make the window so small if you want to avoid this issue...;-).
Comment 8 Andrew Overholt CLA 2011-11-17 12:38:42 EST
Thanks, Eric :)
Comment 9 Eric Moffatt CLA 2011-12-08 15:08:08 EST
Verified in I20111205-2330.