Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 436098

Summary: [GTK3] Cannot reduce column width by dragging
Product: [Eclipse Project] Platform Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: SWTAssignee: Sravan Kumar Lakkimsetti <sravankumarl>
Status: RESOLVED FIXED QA Contact: Arun Thondapu <arunkumar.thondapu>
Severity: major    
Priority: P3 CC: akurtakov, arunkumar.thondapu, bsd, daniel_megert, malaperle, tparker
Version: 4.4Flags: akurtakov: luna+
akurtakov: review+
Target Milestone: 4.4.1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Sergey Prigogin CLA 2014-05-28 13:48:48 EDT
4.4.0.I20140515-1230

To reproduce:
1. In a brand new workspace create a Java project and a class in it.
2. Paste 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 in the first line of the class to produce a long error message. Save the file.
3. Open the Problems view and resize the first column to show the whole message.
4. Restart Eclipse.
5. Try to reduce the width of the first column in the Problems view.

Dragging to the left doesn't work. This is a regression from Kepler.
Comment 1 Sergey Prigogin CLA 2014-05-28 14:01:42 EDT
The problem is specific to SWT with GTK 3. It goes away whith SWT_GTK3=0.
Comment 2 Sravan Kumar Lakkimsetti CLA 2014-06-17 08:28:26 EDT
This looks like this problem got introduced by bug 424891 which was delivered in Luna M6
Comment 3 Marc-André Laperle CLA 2014-06-17 13:32:43 EDT
Sergey, is that with Ubuntu Precise (12.04) ?
Comment 4 Sergey Prigogin CLA 2014-06-17 13:37:12 EDT
(In reply to Marc-Andre Laperle from comment #3)
> Sergey, is that with Ubuntu Precise (12.04) ?

Yes.
Comment 5 Sravan Kumar Lakkimsetti CLA 2014-06-19 04:06:51 EDT
*** Bug 437566 has been marked as a duplicate of this bug. ***
Comment 6 Sravan Kumar Lakkimsetti CLA 2014-06-19 04:42:23 EDT
There are two types of sizes in GTK3 widgets. Minimum size and natural size. The minimum size is the base minimum size allocated to the widget. but the natural size is the size which we set using set_fixed_width call.

In bug 424891 to show the files properties table we added minimum size to the columns. This solved the problem but it caused a setting of minimum size in all the tables. This is causing this problem

Our code to calulate size of a control is based on the minimum sizes. so setting the minimum width resolved bug 424891.

The solution I am proposing here is to shift the calucaltion control size using the natural size. This will provide the default size (calculated based on the fixed sizes set programatically)for a control and will resolve both the problems.

I have tested this using the control examples and snippets. Also tested the file permissions case

The patch is uploaded to gerrit at https://git.eclipse.org/r/#/c/28734/
Comment 7 Alexander Kurtakov CLA 2014-07-14 17:17:29 EDT
Tested again and with the proposed patch Table in ControlExample has its width totally wrong - even one column is not visible.
Comment 8 Sravan Kumar Lakkimsetti CLA 2014-07-15 02:48:00 EDT
(In reply to Alexander Kurtakov from comment #7)
> Tested again and with the proposed patch Table in ControlExample has its
> width totally wrong - even one column is not visible.

Hi Alex,

Thank you for the test. I missed one more change in the original patch. that is causing the problem you are facing. I have uploaded a new patch to the gerrit request. Please use the new patch and let me know your comments on this.

Thanks
Sravan
Comment 9 Sravan Kumar Lakkimsetti CLA 2014-07-16 04:27:44 EDT
the patch was pushed to master through http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=807366ceccc074335641488dd09c21024735cd07

Thank Alex for the review
Comment 10 Sravan Kumar Lakkimsetti CLA 2014-07-17 03:56:35 EDT
Submitted a gerrit patch for 4.4 maintenance branch https://git.eclipse.org/r/30014
Comment 11 Alexander Kurtakov CLA 2014-07-17 12:46:06 EDT
Backport approved.