Re: Custom Icon
- From: "Norman L. Smith" <nls1729 gmail com>
- To: Sam Bull <sam hacking sent com>
- Cc: gnome-shell-list <gnome-shell-list gnome org>
- Subject: Re: Custom Icon
- Date: Tue, 01 Jan 2013 09:23:54 -0500
Sam:
new St.Icon({ icon_name: 'notes-icon' ......
You are creating the icon by name. St.Icon does not know your
icon by name since it is not in "/usr/share/icons/gnome/.....".
You should create a gicon when you provide the image file.
Do it "something" like this:
============================
As needed....
const Gio = imports.gi.Gio;
const Me = ExtensionUtils.getCurrentExtension();
const YourIconPath = Me.path + '/notes-icon.svg';
....
....
let x = new St.Icon({gicon: Gio.icon_new_for_string(YourIconPath)});
============================
I am sure you know this but just to be safe, if you provide an image
file with your extension be sure that it is either public domain or is
covered under a license compatible with the GNU General Public License.
The Open Icon Library is a good place for safe images. Each image is
identified with it's licensing.
Happy New Year,
Norman
On Tue, 2013-01-01 at 00:44 +0000, Sam Bull wrote:
> I just realised the icon I've provided with my extension doesn't display
> by default. I have to get users to run:
>
> ln -s ~/.local/share/gnome-shell/extensions/notes sam sambull org/notes-icon.svg /usr/share/icons/gnome/scalable/places/notes-icon.svg
>
> Is there some way to make the icon work 'out-of-the-box'?
>
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> https://mail.gnome.org/mailman/listinfo/gnome-shell-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]