OSD symbols

Rodney Dawes dobey.pwns at gmail.com
Wed Dec 2 11:17:51 PST 2009


On Wed, 2 Dec 2009 17:52:13 +0100
Jakub Steiner <jimmac at gmail.com> wrote:

> On Wed, Dec 2, 2009 at 5:11 PM, Kenneth Wimer <kwwii at sinecera.de>
> wrote:
> > Most important will be the foreground colors like normal, prelight,
> > active, selected and insensitive.
> 
> To keep things simple, we should treat the symbols as monochrome, ie.
> only one color is used and the symbol would be colorized in the very
> same way as text in the particular context. If a particular widget is
> prelit, fg[PRELIGHT] would be used (I guess that would have to be
> text[PRELIGHT] if it was a text entry widget. So in that regard
> injecting CSS or rendering it the way Patryk suggested would be equal.

Just to clarify how the text/fg and base/bg colors work in GTK+...

text and base are for text entry/list widgets. So symbolic icons
appearing in GtkEntry or GtkTreeView would use text[] as the foreground
color. Icons appearing on the panel or notifications would generally
use fg[] as the color. If we're going to support doing this with
formats other than SVG, then we will have to do the coloring in the
same way that fonts work, and we will have to only use ONE color in the
icons, as fonts do (though the color would really be irrelevant, as
it's the shapes that matter, but complex shapes/gradients would not be
usable). With SVG and named colors, we can specify more complex things.

It might also be pertinent to allow the widget themes to specify
gradients to apply to text as well. This would allow gradients to be
used for the basic shapes, and take care of the concerns for having
gradients of red for warning colors or such.

> > How many other colors are needed? Warning/Failure,
> > Success/Completion/New are two that come to mind.

> If we go for monochrome symbols, this would be a matter of coloring
> the widget's fg/bg. The symbol would get the very same treatment as
> the accompanying text. I think we should avoid recoloring particular
> falure/warning icons in the systray though. We might get away with
> stick an emblem on such symbols.
> 
> http://dl.dropbox.com/u/24178/osd/notification.png
> 
> Otherwise we would need to introduce some standard named colors in the
> widget themes and fall back to some default for those that aren't
> ready, which might not work for all of them.

I think we only need the failure/error, warning, and normal colors. If
you want complex icons, you shouldn't be drawing the symbolic ones
anyway. You should be using a theme that doesn't have them. This is all
an addendum to allow people who want to have these icons in places, to
provide them in a theme, and use them.

It's more of a treatment than a cure, for the problems with tray icons,
and putting icons in text-centric widgets like GtkEntry.

> > Do we need to consider animations (network manager comes to mind)?
> 
> Good question. Going with the tiled single icon file like we have for
> process-working would probably be a cleaner approach than having a
> number suffix to multiple files. Going with whatever Network Manager
> expects now is probably the road of least resistance though?

We should probably consider getting rid of animations in this area. The
network manager animations are horribly confusing. And it also seems to
lag a bit behind the actual network connection being alive. All in all
though, the solution here is probably to fix these issues in NM, rather
than trying to come up with nice animations for it.


More information about the xdg mailing list