Community
Participate
Working Groups
How to reproduce: 1. Open ControlExample in Gtk+ 3 2. Go to Slider Tab As you might see it has initially wrong size. Problem lies in Control.ComputeNativeSize() In Gtk + 2: width = OS.GTK_WIDGET_REQUISITION_WIDTH (h); height = OS.GTK_WIDGET_REQUISITION_HEIGHT (h); produces size 60x15 whereas in Gtk+ 3 gtk_widget_size_request (h, requisition); produces size 20x19
(In reply to comment #0) > How to reproduce: > > 1. Open ControlExample in Gtk+ 3 > 2. Go to Slider Tab > > As you might see it has initially wrong size. > > > Problem lies in Control.ComputeNativeSize() > > In Gtk + 2: > > width = OS.GTK_WIDGET_REQUISITION_WIDTH (h); > height = OS.GTK_WIDGET_REQUISITION_HEIGHT (h); > > produces size 60x15 > > whereas > > in Gtk+ 3 > > gtk_widget_size_request (h, requisition); > > produces size 20x19 Realizing widget before computing size seems to solve the problem. Here is the patch: http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=394422 Please let me know what do you think.
Thanks for the patch - applied to master. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5ed9391060e1aab8e1f0348a337191397f8d0889