Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 499891 - CTabItems do not grab available space
Summary: CTabItems do not grab available space
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-18 05:25 EDT by Simon Scholz CLA
Modified: 2020-06-03 15:29 EDT (History)
2 users (show)

See Also:


Attachments
Unused space in CTabFolder (4.39 KB, image/png)
2016-08-18 05:25 EDT, Simon Scholz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Scholz CLA 2016-08-18 05:25:47 EDT
Created attachment 263646 [details]
Unused space in CTabFolder

As you can see in the screenshot(red rectangle) there is additional space, which should be claimed by the tabs. The text of the CTabItems are shortened and an ellipse(...) is shown, which might not be necessary for one or the other text of a tab in case the space in the red rectangle would be claimed by the CTabItems.

Can anyone tell where this space comes from or how it is calculated?

In order to resolve this issue I tried to create a custom CTabFolderRendering class, where the computeSize and computeTrim methods are changed. Unfortunately there is still some extra space and I can´t tell where it comes from.

Does anyone have an idea to tweak the CTabFolder implementation that it properly takes the extra space.

Maybe the calculations of the "getRightItemEdge" and "getLeftItemEdge", which are used internally do something wrong.

Unfortunately this behavior is not deterministic , because when the size of the  CTabFolder shrinks this extra space is sometimes takes and sometimes not(like in the screenshot)

Any advice where I should have a look at would be helpful.

There must be something wrong with the size calculation in general, since this bug might be connected with Bug 499215.
Comment 1 Lars Vogel CLA 2016-09-16 04:51:25 EDT
The minimum number of charaters are set to 15 for the editor area. Maybe there is not enough space to show an additional tab?
Comment 2 Lothar Lattermann CLA 2016-10-12 09:22:44 EDT
We are actually facing this problem -- we cannot claim the top right space fully. Defining a toolbar, elements in this toolbar will be pushed to the left and if there isn't enough space down in the next row. 

It effectively prevents us from applying our styling to the tab area. Well actually this issue and bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=499215.
Comment 3 Eclipse Genie CLA 2020-06-03 15:29:57 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.

--
The automated Eclipse Genie.