Bug 1119 - Search box icons aren't visible on macOS
Summary: Search box icons aren't visible on macOS
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-09-28 18:42 UTC by Mikayla Hutchinson [MSFT]
Modified: 2011-09-30 20:45 UTC (History)
1 user (show)

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

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:

Description Mikayla Hutchinson [MSFT] 2011-09-28 18:42:11 UTC
The icons embedded in search boxes aren't visible on MacOS.

This includes
* Navigate to
* Edit References
* Find in Files

This is a problem because some of those icons can be clicked to access additional options and functionality.
Comment 1 Mikayla Hutchinson [MSFT] 2011-09-28 18:59:03 UTC
This also affects the addin manager.
Comment 2 Mikayla Hutchinson [MSFT] 2011-09-30 19:43:19 UTC
This is caused by:
WARNING [2011-10-01 00:30:33Z]: Gtk-Warning: Could not find the icon 'gtk-find'.

it's very odd. Mono on Mac doesn't include any GTK icon theme. GTK has some kind of internal fallback for built-in icons, which works when we pass a stock ID to GTK APIs e.g. GtkImage or GtkButton. However, if we try to explicitly load pixbufs from the default icon theme, we get nothing.

What's odd is that it works on Windows, which also doesn't have icon themes installed.

Initially I thought it was a packaging bug in Mono, but I tested with bockbuild too, which doesn't have anything removed, and it works.

And we know the gtk-find icon is *somewhere*, because it works on the toolbar.
Comment 3 Mikayla Hutchinson [MSFT] 2011-09-30 19:54:40 UTC
Er, I mean it doesn't work with bockbuild.
Comment 4 Mikayla Hutchinson [MSFT] 2011-09-30 20:45:00 UTC
Fixed in monodevelop and mono-addins.

Apparently GTK built-in icons comes from an IconSet, and are not in the icon theme.  The convenient way to use IconSet is Widget.Render, and if it's null you can fall back to IconTheme.Default.LoadIcon.

No idea why it works on other platforms. Maybe it's just because the GTKs there are older. 

I did a quick review of all other icon loading codepaths in MD and they seemed okay.