Bug 577140 - Toolbar does not resize/layout under certain circumstance
Summary: Toolbar does not resize/layout under certain circumstance
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.22   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-09 07:23 EST by Christoph Laeubrich CLA
Modified: 2021-12-01 10:21 EST (History)
3 users (show)

See Also:


Attachments
Snippet (2.78 KB, text/plain)
2021-11-09 07:29 EST, Christoph Laeubrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Laeubrich CLA 2021-11-09 07:23:16 EST
We have a toolbar that changes the text of its items or the size of a control, but this currently does not work to resize the toolbar accordingly.

I have attached a snippet (toolbar with red background to see its size) wich can be used to reproduce this behaviour with some flags:

A) You can click on any button to "blow up" the toolbar
B) Now set forceLayout = true, it still fails to resize even if I request to layout the component (but might be I'm using the method wrong)
C) set useAsyncRequest=true now the toolbar expands as desired 

I would exspect that I never have to call any layout methods and the example works tiht both flags set to false.
Comment 1 Christoph Laeubrich CLA 2021-11-09 07:29:55 EST
Created attachment 287466 [details]
Snippet
Comment 2 Christoph Laeubrich CLA 2021-11-09 07:36:50 EST
I also see this issue in Linux/Debian so it might not be an Windows-Only issue. Any Mac user can check if this is the case under mac also?
Comment 3 Phil Beauvoir CLA 2021-11-09 09:28:16 EST
(In reply to Christoph Laeubrich from comment #2)
> I also see this issue in Linux/Debian so it might not be an Windows-Only
> issue. Any Mac user can check if this is the case under mac also?

Tested on macOS Monterey 12.01 x86_64.

I had to set forceLayout and useAsyncRequest to true for the toolbar to resize.
Comment 4 Christoph Laeubrich CLA 2021-11-09 09:39:31 EST
(In reply to Phil Beauvoir from comment #3)
> Tested on macOS Monterey 12.01 x86_64.
> I had to set forceLayout and useAsyncRequest to true for the toolbar to
> resize.

Thanks for the verification!
Comment 5 Lars Vogel CLA 2021-11-09 10:50:39 EST
Jörg, can you have a look?
Comment 6 Jörg Kubitz CLA 2021-11-10 02:27:19 EST
(In reply to Lars Vogel from comment #5)
> Jörg, can you have a look?
Tested: does not relate to the ToolBar.computeSizeInPixels cache "return new Point (_width, _height)"
Thats all i can contribute.