Bug 242163 - [SWT Examples - SWT Controls] top-level tab folder requires wide screen on OS X
Summary: [SWT Examples - SWT Controls] top-level tab folder requires wide screen on OS X
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-27 06:02 EDT by Volker Wegert CLA
Modified: 2021-11-12 11:39 EST (History)
2 users (show)

See Also:


Attachments
screenshot (55.83 KB, image/png)
2008-07-27 06:02 EDT, Volker Wegert CLA
no flags Details
preview of a possible solution (9.34 KB, patch)
2008-07-29 15:40 EDT, Volker Wegert CLA
no flags Details | Diff
proposed patch (now includes all controls) (21.88 KB, patch)
2008-09-10 16:05 EDT, Volker Wegert CLA
no flags Details | Diff
new screenshot (151.76 KB, image/png)
2009-11-08 08:35 EST, Volker Wegert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Wegert CLA 2008-07-27 06:02:15 EDT
Created attachment 108494 [details]
screenshot

Build ID: I20080617-2000

Steps To Reproduce:
In the SWT Controls view, the top-level tab folder (the one where one can select the widget to try out) is very wide. This is not a problem on Linux (and probably not even on Windows) where the tab folder contains buttons to navigate left and right to the invisible tabs. However, on OS X, there are no such butons - the tab buttons are centered and the leftmost and rightmost buttons simply drop out of the window and become inaccessible (see screenshot). A screen resolution of about 1500 pixels in width is required to display all of the tabs.


More information:
Comment 1 Steve Northover CLA 2008-07-28 17:40:59 EDT
We can't make the operating system show arrows to make the clipped items visible (it won't do it).  At one point, the ControlExample was modified to use smaller labels on OS X.  Did we lose that code?
Comment 2 Volker Wegert CLA 2008-07-29 00:50:16 EDT
I went as far back as the CVS history would let me, but didn't find code that would have changed the font sizes. There is another workaround already in place:
		/* Workaround: if the tab folder is wider than the screen,
		 * carbon clips instead of somehow scrolling the tab items.
		 * We try to recover some width by using shorter tab names. */

From my point of view, that's only a temporary workaround - the next widget that adds a tab breaks the tab folder again. (Unless you're declaring SWT as completed, of course ;-)) I'd suggest replacing the tabs with a drop-down listbox and see whether I can contribute a patch...
Comment 3 Volker Wegert CLA 2008-07-29 00:58:35 EDT
...and btw, the getShortTabText() method used in the workaround I mentioned earlier is implemented only by five tabs (CoolBar --> CB, ExpandBar --> EB, ProgressBar --> PB, TabFolder --> TF, ToolBarTab --> TB) - and it doesn't even work for the view because setShellSize() is only called for the standalone example... 
Comment 4 Steve Northover CLA 2008-07-29 10:06:57 EDT
At the very least, the code that shortens for the tabs should run for the plugin case.

I'm not sure about replacing the tab folder with a drop down.  First of all, we don't support the native Mac drop down folder and we would want to write that code first.
Comment 5 Volker Wegert CLA 2008-07-29 10:55:57 EDT
Sorry, that was ambiguos - I was thinking of a Combo with SWT.READ_ONLY set, not some Mac-specific Widget.
Comment 6 Volker Wegert CLA 2008-07-29 15:40:13 EDT
Created attachment 108691 [details]
preview of a possible solution

I've created a preview of how I think this problem might be tackled. Note that this patch breaks several of the existing demos - I'll clean this up once someone tells me that's the way to go.

What I don't like about this: Even in maxmized mode on a MacBook Pro, some of the examples take up so much space that the listeners area drops out of the visible area. How about using a tab folder in the right part of the window / view with two tabs for parameters and events?
Comment 7 Volker Wegert CLA 2008-09-10 16:05:31 EDT
Created attachment 112243 [details]
proposed patch (now includes all controls)

I've updated the patch to cover all of the controls. 

About the other issue (Listeners group dropping out of the view) - how about using an ExpandBar on the right-hand side to include the group boxes (Styles, Size, ...)? Any suggestions?
Comment 8 Steve Northover CLA 2008-09-10 17:49:55 EDT
Carolyn, you own the example code.  Please evaluate the patch.  Thanks.
Comment 9 Volker Wegert CLA 2009-11-08 08:34:47 EST
More than a year has passed, and not much seems to have happened here. I'll attach a screenshot to demonstrate the issues:
 - the tab folders at the bottom fit barely and only because some of the texts are abbreviated
 - the listeners are still unusable even when in full-screen mode
:-(
Comment 10 Volker Wegert CLA 2009-11-08 08:35:25 EST
Created attachment 151643 [details]
new screenshot
Comment 11 Eclipse Webmaster CLA 2019-09-06 16:10:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.