After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739864 - Removal of symbolic icons.
Removal of symbolic icons.
Status: RESOLVED WONTFIX
Product: gnome-shell
Classification: Core
Component: general
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-10 05:02 UTC by ktyrannum
Modified: 2014-11-11 23:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Symbolic icons removed from gnome-shell ui. (40.73 KB, patch)
2014-11-10 05:09 UTC, ktyrannum
rejected Details | Review
st-theme-node: Add an icon-type property for symbolic/regular icons (44.36 KB, patch)
2014-11-11 01:26 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review

Description ktyrannum 2014-11-10 05:02:03 UTC
Gnome shell icons are currently hardcoded with symbolic icon references. Enhancement removes hard code to symbolic icons and replaces with themed icon reference.
Comment 1 ktyrannum 2014-11-10 05:09:25 UTC
Created attachment 290300 [details] [review]
Symbolic icons removed from gnome-shell ui.

Patch file attached.
Comment 2 Florian Müllner 2014-11-10 10:12:15 UTC
Review of attachment 290300 [details] [review]:

No. Symbolic icons *can* be themed, and we do want symbolic icons there rather than full-color ones.
Comment 3 Florian Müllner 2014-11-10 10:15:55 UTC
I'm not quite sure what you are trying to achieve, but the use of symbolic icons is a design decision. If the goal is to allow the use of full-color icons, I'm afraid I can't think of a good solution that would allow that off-hand, but dropping the use of symbolic icons for *everyone* is certainly not an option.
Comment 4 ktyrannum 2014-11-10 22:24:27 UTC
The result of this patch does allow for full-color icons to be used throughout. The  color-less black and white icons are boring. No performance or stability issues encountered since this patch was implemented.

As a design feature, why are symbolic icons used here in place of full-color? While the intended result of this patch has been reached, if the specific design decision prevents or otherwise disables other features then I will revert back to symbolic icons.

Would a better patch / design implementation be to allow the use of either symbolic icons, or the full-color counterparts? This could certainly be something written into the ui, and I can't see any degradation to performance or stability or unwanted anomalies so far.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-11-10 22:46:03 UTC
The design rationale is that the icons are *supposed* to be boring. GNOME Shell is supposed to be in the background compared to the applications, which are front and center.

I'm not opposed to your patch, assuming that we also add back something like StIconType, now that GTK+ can do the lookup automatically like with GTK_ICON_LOOKUP_FORCE_SYMBOLIC.
Comment 6 ktyrannum 2014-11-11 00:15:45 UTC
So would something like this work then, in say network.js
const SHELL_USE_SYMBOLIC_ICONS_KEY = 'shell-symbolic-icons'; 
get _icon_type() {
        if (!this._settings)
            this.loadConfig();
        return this._settings.get_boolean(SHELL_USE_SYMBOLIC_ICONS_KEY) ? 1 : 0;
    },

icon_type: function(icon_name) {
        if (!icon_name)
            if (this._icon_type)
                return "-symbolic";
            else
                return "";

        if (this._icon_type)
            if (String(icon_name).search("-symbolic") != -1)
                return icon_name;
            else
                return icon_name + "-symbolic";
            else
        if (String(icon_name).search("-symbolic") != -1)
            return String(icon_name).replace("-symbolic", "");
        else
            return icon_name;
    },


Then for example
this._airplaneIcon.icon_name = 'airplane-mode' + this.icon_type();

From there it would be possible to add a checkbox or slider somewhere to switch between the symbolic and full color boolean SHELL_USE_SYMBOLIC_ICONS_KEY.



Or, how about this? - This just seems like there would be a lot of lines to change.

let airplaneIcon = new St.Icon({ icon_type: St.IconType.FULLCOLOR, 
                                      icon_size: 22,
                                      icon_name: 'airplane-mode' });

I am not 100% on my GNOME development yet, but I am up for learning anything.
Comment 7 ktyrannum 2014-11-11 00:22:10 UTC
Some of this was taken from the Openweather extension, that has the desired functionality at this point. ONly using full color icons is already complete by removing -symbolic, but the ability to switch between the two would be nice as well. Just another level of granularity people enjoy.
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-11-11 00:54:02 UTC
Nah, I'm saying that the flags we would pass to gtk_icon_theme_lookup would change based on some "icon type". Ideally, this would be pulled from CSS.

See: https://git.gnome.org/browse/gnome-shell/tree/src/st/st-texture-cache.c#n841
Comment 9 ktyrannum 2014-11-11 01:20:34 UTC
Maybe that's a bit more complicated than I understand. Since removing -symbolic and forcing icons to full color icons, it would be easy to add a selection option somewhere to control each functions full color / symbolic use of icons. I'm treating bluetooth, netowork, volume, and so on js like an extension. Nothing more. However GTK references or looks up icons is on the far back end. 

Here is the result of the changes.

Places Extension has been modified.
http://snag.gy/hNb0W.jpg

Top bar icons modified
http://snag.gy/ZTqxb.jpg

Status Tray
http://snag.gy/Dq13A.jpg
Comment 10 Jasper St. Pierre (not reading bugmail) 2014-11-11 01:26:07 UTC
Created attachment 290392 [details] [review]
st-theme-node: Add an icon-type property for symbolic/regular icons

This lets the choice of symbolic / regular icons be specified by CSS.
This matches what GTK+ now does and helps out people who want to make
custom themes for gnome-shell.



Something like this was what I was imagining. You would probably need to triple-check it for other things like the message tray and dialogs, since I didn't do any of that effort. However, it shows off the approach well enough.
Comment 11 ktyrannum 2014-11-11 02:04:32 UTC
Makes a lot more sense now.

This approach is surely effective and does allow for custom theming, but does not give control to the user outside of manual modifications to the gnome-shell.css

I think this could work nicely, but I would like to see an interactive ability to modify symbolic vs full color. It would be possible to modify gnome-tweak-tool and add a section for Use Symbolic Icons. That would go back to the code above, although modified.

CSS is great, but just doesn't give the user any control without modifying a tons of stuff.
Comment 12 André Klapper 2014-11-11 10:06:30 UTC
(In reply to comment #4)
> The  color-less black and white icons are boring.

Silhouette basic geometry shapes do recognize faster for the user. If you have exactly two minutes, watch https://www.youtube.com/watch?v=z2exxj4COhU#t=8m12s
Comment 13 ktyrannum 2014-11-11 17:45:13 UTC
This was a great watch, thank you.

How about adding an option to switch between symbolic or full color. Instead of hard coding symbolic, add an option selector to gnome-tweak-tool. This shouldn't even take much time.
Comment 14 Florian Müllner 2014-11-11 18:01:46 UTC
Why not just use an icon theme without symbolic icons?
Comment 15 ktyrannum 2014-11-11 19:04:20 UTC
That's possible I guess. I would still like to see an interactive way to switch between symbolic / full icons color from an interface. If I make the changes and submit, would they be considered for a future enhancement? If anything, it just gives the user the option to use whatever icons they want.
Comment 16 Florian Müllner 2014-11-11 19:11:10 UTC
No, because symbolic and fullcolor icons are not mutually exclusive - we have used some fullcolor icons in *addition* to symbolic icons in the past, and we may again in cases where it makes sense.
Besides, the tweak tool *has* a graphical way to change the icon theme which has an immediate effect (e.g. you don't have to reboot, relogin or whatever). How would a symbolic/fullcolor switch be more interactive than that?
Comment 17 ktyrannum 2014-11-11 19:52:25 UTC
For every symbolic icon, there is a comparable full color icon. There is currently no option to switch gnome-shell between the two without the patch provided above. While the tweak-tool does allow selection of various icon themes, it does not specify symbolic or not. Currently, gnome-shell explicitly names symbolic icons thus symbolic will be used for the given icon theme. For example, icons may change on the desktop, or within file manager, but not on the top bar. These icons will change to the symbolic counterpart of the selected theme. I am suggesting adding this functionality.
Comment 18 Florian Müllner 2014-11-11 20:05:15 UTC
(In reply to comment #17)
> Currently, gnome-shell explicitly names symbolic icons thus symbolic will be 
> used for the given icon theme.

Only if the theme *has* symbolic icons, otherwise it will fall back to fullcolor ones. Which is why I suggested in comment #14 to use such a theme.

Also note that gnome-shell is not the only user of symbolic icons, they are used in many gnome apps - should every single one of them get their own switch? Now, if you can convince GTK+ maintainers that there should be a setting like that to force the loading of fullcolor icons even when the program requested a symbolic one, fine. But not in gnome-shell.
Comment 19 ktyrannum 2014-11-11 23:10:15 UTC
For this enhancement, lets just keep to gnome-shell.

this._airplaneIcon.icon_name = 'airplane-mode' + this.icon_type();

Could replace

this._airplaneIcon.icon_name = 'airplane-mode';

For example...

So there would be no need to modify everything, just gnome-shell.
Leaving more control in the hands of the user. Yes I know they can just use a theme with no symbolic icons, but what if they want full color icons for Adwaita used in the shell? Or symbolic icons for some other theme?

I will make all the changes and submit the patch here. If anything, it will at least give the option to the user which icons they want.