Re: A couple of extension writing questions

On Sun, May 13, 2012 at 7:57 PM, Neil Bird <gnome fnxweb com> wrote:
>  I'm just putting the final touches to a GNOME Shell extension I've been
> writing, and I'd like to ask if anyone has any idea how to achieve some
> things I've not been able to find out for myself.
> - I'd like to use a custom icon.  At the moment, I'm using a text label.  I
> did manage to load a PNG as an icon, but couldn't figure out how to size it
> correctly (it's 16px high but not square), and with no supplied size info.
> it appeared too low (with its top aligned to the text's bottom), making the
> whole top panel taller.  Plus, by default it wouldn't highlight on hover.
>  Do I need to get clever with some CSS and background settings?

I recently got this working. Your icons have to be made by using this repo:
(add your icons to the combined SVG, and use the included script to export them)

In theory you can do "something" to make your own SVG icons symbolic
(which is how you get the highlighting effect), but I've never been
able to find out what that something is.

>  I also couldn't figure out where to put custom SVGs, I can only make
> extensions use system-installed /usr/share/... files. /usr/local/share/../ &
> ~/.local/share/... didn't work (although neither of these is practical for a
> stand-alone extension).  In fact, even a standard one didn't work
> (accessories-text-editor-symbolic.svg), I just got a grey rectangle
> [although that was the only standard one that failed].

As for getting them to load, that definitely seems to be a deficiency
for extensions. My solution is as follows, but it's admittedly lame:

(feel free to look around the rest of the extension for my icon
directory layout etc, you seem to need a specific directory structure
for it to work)

> - I'd also like to style some tooltips (to be left aligned), but I couldn't
> find a way to refer to them from the stylesheet, nor to apply style classes
> to them from code.  Is that possible?
>  For ref. I'm on Fedora 16 & GNOME 3.2.
> --
> [phoenix@fnx ~]# rm -f .signature
> [phoenix@fnx ~]# ls -l .signature
> ls: .signature: No such file or directory
> [phoenix@fnx ~]# exit
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]