Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am creating a Unity AppIndicator using Python + PyGObject, but I wish for it's icon to be in standard Ubuntu style. Where can I find appropriate guidelines for using colours (or is it just white/transparent?), or at least icons of standard AppIndicators? That is about 13.04, as I suppose, the icon style won't change much after this version (though we'll see).

Also, I have a question about setting my icon to my indicator. If I put it in the same folder, as the .py file, how should I refer to it in the code?

share|improve this question
2  
The Ubuntu Humanity icons follow the Tango and Gnome guidelines. Indicators in Ubuntu come in 2 color variants dark and light, you can find the colors by opening one of the SVG files in /usr/share/icons/ubuntu-mono-X also you'll find the sizes there. –  Uri Herrera May 1 '13 at 22:59
    
Thank you, Uri! I helped. So, no one can say anything about the second part of my question? –  Phlya May 2 '13 at 18:47
2  
I'm no expert, but afaik icons should be placed in usr/share/icons/hicolor/[size]/[category]. –  Uri Herrera May 2 '13 at 19:40
    
OK, where should I state that? In some installation scripts? –  Phlya May 2 '13 at 20:48
    
Agreed, few infomration out there on this subject. At least, I was able to find out about "recommended" icons size: bugs.launchpad.net/ubuntu/+source/indicator-application/+bug/…. However, I noticed that many applicaitons distribute 22x22 icons, and also same icons in 24x24 size - not sure why though. Maybe for Gnome? –  Timur Jul 13 at 19:01

1 Answer 1

To use custom icon located in python script folder, use this way (PyGI code snippet)

appindicator.Indicator.new_with_path (
   "indicator-name",
   "icon-name",
   appindicator.IndicatorCategory.APPLICATION_STATUS,
   os.path.dirname(os.path.realpath(__file__))
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.