Merge pull request #1802 from hbons/fix/linux-status-icons

linux ui: Fix icon lookup for statusicon
This commit is contained in:
Hylke Bons 2018-02-11 16:51:51 +00:00 committed by GitHub
commit 44727f31f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,8 @@
using System;
using System.IO;
using System.Reflection;
using Gtk;
using Sparkles;
@ -48,6 +50,8 @@ namespace SparkleShare
application.Register (null);
application.Activated += ApplicationActivatedDelegate;
IconTheme.Default.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons"));
var label = new Label ();
Gdk.Color color = UserInterfaceHelpers.RGBAToColor (label.StyleContext.GetColor (StateFlags.Insensitive));
SecondaryTextColor = UserInterfaceHelpers.ColorToHex (color);

View file

@ -27,7 +27,7 @@ namespace SparkleShare {
public static Gdk.Pixbuf GetIcon (string name, int size)
{
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)
icon_theme.AppendSearchPath (search_path);