Merge pull request #1802 from hbons/fix/linux-status-icons
linux ui: Fix icon lookup for statusicon
This commit is contained in:
commit
44727f31f6
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Sparkles;
|
using Sparkles;
|
||||||
|
@ -48,6 +50,8 @@ namespace SparkleShare
|
||||||
application.Register (null);
|
application.Register (null);
|
||||||
application.Activated += ApplicationActivatedDelegate;
|
application.Activated += ApplicationActivatedDelegate;
|
||||||
|
|
||||||
|
IconTheme.Default.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons"));
|
||||||
|
|
||||||
var label = new Label ();
|
var label = new Label ();
|
||||||
Gdk.Color color = UserInterfaceHelpers.RGBAToColor (label.StyleContext.GetColor (StateFlags.Insensitive));
|
Gdk.Color color = UserInterfaceHelpers.RGBAToColor (label.StyleContext.GetColor (StateFlags.Insensitive));
|
||||||
SecondaryTextColor = UserInterfaceHelpers.ColorToHex (color);
|
SecondaryTextColor = UserInterfaceHelpers.ColorToHex (color);
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace SparkleShare {
|
||||||
public static Gdk.Pixbuf GetIcon (string name, int size)
|
public static Gdk.Pixbuf GetIcon (string name, int size)
|
||||||
{
|
{
|
||||||
IconTheme icon_theme = new IconTheme ();
|
IconTheme icon_theme = new IconTheme ();
|
||||||
icon_theme.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons"));
|
icon_theme.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons"));
|
||||||
|
|
||||||
foreach (string search_path in IconTheme.Default.SearchPath)
|
foreach (string search_path in IconTheme.Default.SearchPath)
|
||||||
icon_theme.AppendSearchPath (search_path);
|
icon_theme.AppendSearchPath (search_path);
|
||||||
|
|
Loading…
Reference in a new issue