Bug 10358 - Values in property pad always blank on windows
Summary: Values in property pad always blank on windows
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 4.0
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Bugzilla
: 11080 11692 ()
Depends on:
Reported: 2013-02-17 18:48 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-04-23 13:50 UTC (History)
7 users (show)

Tags: gtk
Is this bug a regression?: ---
Last known good build:

screenshot (77.26 KB, image/png)
2013-03-15 11:17 UTC, Aleksander Morgado
Patch 1/2 (1.57 KB, patch)
2013-04-12 05:30 UTC, Aleksander Morgado
Patch 2/2 (5.06 KB, patch)
2013-04-12 05:30 UTC, Aleksander Morgado

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Comment 1 Mikayla Hutchinson [MSFT] 2013-02-26 23:13:20 UTC
This also shows up when using WIMP so it appears to be a GTK issue, not a theme issue.

Comment 2 Mikayla Hutchinson [MSFT] 2013-03-12 18:06:24 UTC
Can we please prioritize this? it s a serious regression from GTK 2.16.x.
Comment 3 Mikayla Hutchinson [MSFT] 2013-03-12 18:06:39 UTC
*** Bug 11080 has been marked as a duplicate of this bug. ***
Comment 4 Aleksander Morgado 2013-03-15 11:17:56 UTC
Created attachment 3627 [details]

So, I tried to see where the issue was coming from, and ended up by commenting these two lines in PropertyGridTable.cs:

	ctx.Save ();
	//ctx.Rectangle (0, y, dividerX, h + PropertyTopBottomPadding*2);
	//ctx.Clip ();
	ctx.MoveTo (x, y + PropertyTopBottomPadding);


Once those lines are commented, the result is as seen in the screenshot attached; the text in the fields is shown, but the right label overlaps on top of the field text.

Now, the original code looks right to me, so this really seems to be an issue with the Pango/Cairo layout handling...
Comment 5 Michael Natterer 2013-03-21 10:12:38 UTC
I have a theory but can't test it because I don't have windows:

PropertyGridTable.cs (Draw) uses ShowLayout on a cairo context to draw
the property's name, and then calls

PropertyEditorCell.cs (Render) which uses gdk_draw_layout().

I would guess that mixing these two ways of drawing strings doesn't
work well on Windows. Without fixing the actual bug, we could perhaps
work around it by simply using ShowLayout in PropertyEditorCell too.
Comment 6 Lluis Sanchez 2013-04-10 03:42:10 UTC
*** Bug 11692 has been marked as a duplicate of this bug. ***
Comment 7 Aimee Bailey 2013-04-10 08:02:23 UTC
If it helps, the problem for me only exists when the pad is docked. If un-docked as a floating window, the fields render fine.
Comment 8 Aleksander Morgado 2013-04-12 05:30:25 UTC
Created attachment 3805 [details]
Patch 1/2
Comment 9 Aleksander Morgado 2013-04-12 05:30:49 UTC
Created attachment 3806 [details]
Patch 2/2
Comment 10 Aleksander Morgado 2013-04-12 05:34:13 UTC
The previous two patches for monodevelop avoid the issue with the cairo+pango mix. I've tried them under win32 and they do work properly.

Regarding the actual cairo+pango issue, didn't get much info yet.
Comment 11 Mikayla Hutchinson [MSFT] 2013-04-23 00:14:59 UTC
Reviewed, applied, tested and pushed. Thanks!

Let's forget about the upstream issue for now, not worth fixing mixed Cairo/GDK drawing issues IMO. I found a few with the latest Cairo on Mac and similarly fixed them by porting the text rendering to Cairo.
Comment 12 Michael Natterer 2013-04-23 05:09:42 UTC
For the record, this is also a sort of undeprecation that will make
porting to GTK+ 3.x easier.
Comment 13 Mikayla Hutchinson [MSFT] 2013-04-23 13:50:03 UTC
Agreed. A while back I started migrating Gdk code whenever I get the chance.