Bug 576921

Summary: Dynamic toolbar controls are not resized correctly if there are items with FORCE_TEXT
Product: [Eclipse Project] Platform Reporter: Marc Ernst <marc.ernst>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, platform-swt-inbox, rolf.theunissen
Version: 4.21Keywords: needinfo, regression
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Plugin with dynamic toolbar item and about button with forced text
none
Screenshot using the reproducer plug-in
none
Screenshot using the reproducer plug-in and Eclipse 4.22 none

Description Marc Ernst CLA 2021-10-27 10:41:19 EDT
I've created a dynamic toolbar control. It was working fine with 4.20 but with the current version not all the toolbar icons are shown, the toolbar is just cut at some size. The toolbar looks like it is not resized correctly. The other toolbar items except the dynamic toolbar item have the flag mode="FORCE_TEXT". If I remove it everything gets resized correctly.
Comment 1 Andrey Loskutov CLA 2021-10-27 10:56:01 EDT
Please provide a small self contained project or snippet that shows the issue. Could be either SWT issue or some "optimization" in the UI renderer.
Comment 2 Rolf Theunissen CLA 2021-11-08 05:45:27 EST
Most likely also an regression of Bug 574641, this case might be fixed already.

Does the problem still reproduce in 4.22? Please provide the example to validate it.
Comment 3 Marc Ernst CLA 2021-11-11 02:33:22 EST
Created attachment 287488 [details]
Plugin with dynamic toolbar item and about button with forced text

Sorry I did not had time to look into it until now. I uploaded a little plug-in as reproducer. It adds a toolbar with a dynamic contribution item and an about button with forced text. When you launch it, you can see that the dynamic contribution item hides the about button. Couldn't check yet with newest version.
Comment 4 Marc Ernst CLA 2021-11-11 02:36:45 EST
Created attachment 287489 [details]
Screenshot using the reproducer plug-in
Comment 5 Marc Ernst CLA 2021-11-12 02:30:07 EST
Created attachment 287499 [details]
Screenshot using the reproducer plug-in and Eclipse 4.22

Tried with latest Eclipse 4.22 (11/11). Looks a bit different, the icon is now shown but still the text is cut. Attached a screenshot.