Community
Participate
Working Groups
Created attachment 252554 [details] initial size I'm on Fedora 21, KDE, Eclipse 4.5.0.N20150411-1500 gtk3-3.14.12-1.fc21.x86_64 Open Windows->Preferences->General->Appearance->Editors->Text Editors->Annotations The selection list is way too narrow, please see the attached screenshot. After clicking on the sash between the tree and the preference page, the entire dialog "explodes" in the size and the list receives the appropriate size to see some content (second screenshot). GTK2 has no problems to show the right list dimension at the very beginning.
Created attachment 252555 [details] same dialog after clicking on the sash in the middle
This might be a PlatformUi thing. SWT widgets generally go boy whatever layout they're given. But if this occurs with smaller swt snippets or you think this is SWT, please transfer back.
(In reply to Leo Ufimtsev from comment #2) > This might be a PlatformUi thing. SWT widgets generally go boy whatever > layout they're given. But if this occurs with smaller swt snippets or you > think this is SWT, please transfer back. If I open the same dialog the second time, it is correctly sized. Only the first time, the size is incorrect. I think that indicates a SWT problem.
(In reply to Lars Vogel from comment #3) > (In reply to Leo Ufimtsev from comment #2) > > This might be a PlatformUi thing. SWT widgets generally go boy whatever > > layout they're given. But if this occurs with smaller swt snippets or you > > think this is SWT, please transfer back. > > If I open the same dialog the second time, it is correctly sized. Only the > first time, the size is incorrect. I think that indicates a SWT problem. I see. I can reproduce on GTK3 but not on Gtk2. Seems like SWT after all. We should investigate.
*** Bug 467921 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/59486
https://git.eclipse.org/r/59486 fixes the issue in Platform UI.
New Gerrit change created: https://git.eclipse.org/r/59730
I think this bug is related to bug 465280. Namely, in GTK3, Control.getSize() returns (0,0) when a control is invisible. However, there is another issue with this page. If a user declares the org.eclipse.ui.editors.markerAnnotationSpecification extension point with a very big label, he will get the page as shown in the attachment. I have created a new patch against Platform Text. It fixes both of the issues.
Created attachment 257749 [details] The Annotations page
New Gerrit change created: https://git.eclipse.org/r/61863
https://git.eclipse.org/r/61863 fixes the issue in SWT, but, I think, it would be also necessary to apply https://git.eclipse.org/r/59730.
Eric, I have tried to use getItemWidth() and got the Annotations page too width. See the screenshots.
Created attachment 260233 [details] The Annotations page with getItemWidth()
Created attachment 260234 [details] The Annotations page with the https://git.eclipse.org/r/#/c/61863/ patch
(In reply to Snjezana Peco from comment #14) > Created attachment 260233 [details] > The Annotations page with getItemWidth() Would it be possible to see the code that generates this screenshot? It doesn't look to be far off from what the natural size should be.
Created attachment 260237 [details] A patch
(In reply to Snjezana Peco from comment #17) > Created attachment 260237 [details] > A patch Alright, looks like that approach isn't going to work. I'm investigating another possibility, will post a patch if I can get it to work.
New Gerrit change created: https://git.eclipse.org/r/68223
(In reply to Eclipse Genie from comment #19) > New Gerrit change created: https://git.eclipse.org/r/68223 I discovered that calculateWidth() in Table calculates the width of a row for a TableItem. So when setting the text/image of a TableItem, we can just calculate the size of the row and update the maxWidth variable in Table (if necessary). maxWidth will be set to the widest TableItem in the Table, which we can use in computeSize(). Note that Tables with multiple columns seem to size themselves properly, so we don't need to be concerned about that case. With this approach we can also avoid looping through any TableItems in Table.
Gerrit change https://git.eclipse.org/r/68223 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8e660b6aa364e12e42139eab0334fdf17deb8b66
(In reply to Eclipse Genie from comment #21) > Gerrit change https://git.eclipse.org/r/68223 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=8e660b6aa364e12e42139eab0334fdf17deb8b66 In master now.
verified in I20160317-0200 on ubuntu 15.10