How can we override the graphic for the Statusbar alert icon?

Since Gramps is theming is evolving, it seems reasonable to open a couple basic discussions about how to customize the GUI’s look. Hopefully, this will lead to enough understanding to write a guide for new contributors who want to help refine the appearance of the Gramps interface.

I’ve noticed that some of the outlines for buttons tend to disappear in Dark Mode themes. Such problems affect the Windoze and macOS GUI more often… since the main developers work in Linux and select icons that work well in the default themes there.

So let’s start with a icon that is pretty bad there: the Warning icon. (But the abstraction is not great in light mode of adwaita theme on Linux either. So everyone can play along.)


A long time ago, a bug report description included a step to “click the Mushroom button” to generate an error. It took a little while to realize that they meant the Lightbulb of the Warning button on the statusbar. While a Dark mode theme, only the light portions of the icon showed. And that did resemble a mushroom.

The Gramps 5.0 illustration from Statusbar intro in the wiki isn’t much more recognizable.

 

Adwaita’s Dark mode for Fedora Linux is better but only once you know is is a lightbulb abstraction:

Note: There is a wiki article about how to “Overrule Gramps Icons” for the 2.4 version. But it is pretty outdated.

1 Like

Something like this ??

I pointed the code to the emblem-important icon in Adwaita and made it LARGE_TOOLBAR

light

dark

2 Likes

Ok. Thanks for identifying our target!

I wonder if this could be done in a CSS layer instead of touching core code? So we don’t have to tweak code or standard themes.

Maybe it could start with a layer that inherits from Adwaita. So if we select that theme, it can survive updating the OS, Gramps or GTK.

Lol. I am the author of the :mushroom: statement

About css, you can include any svg image in css. SVG is wrote in XML so including it in CSS is easy, open the file in editor and copy its text to the CSS anchor:

Maybe this one from Wikipedia/Commons could be visible in both themes:

1 Like

I am not a CSS expert but as I understand it, the CSS modifies things about the icon; size, spacing, background color, does it display a box around it, etc. But the icon stays the same. Especially for Windows (and Mac ??) users.

FYI: the initial icon Gramps is using is dialog-information. It is stored in…

icons/Adwaita/ /status/dialog-information.png

and is used by three files…

gui/widgets/buttons.py
gui/widgets/validatedmaskedentry.py
gui/glade/dialog.glade

1 Like

Found it. It is actually a lightbulb.

dialog-information

Adwaita icons status/dialog-information

So it would acually be easier to switch the icon leaving the code unchanged.

Improving the icon probably a good thing on its own merit. (Gramps moved its icons to a Tango style abstraction and away from a realistic style long ago.)

And targeting all the less than elegant icons is also a good thing. But discovering what’s possible with customizing with theming is important too.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.