The current GTK algorithm for finding an icon seems to be: main icon theme in choosen style > fallback icon theme in choosen style > main icon theme in another style > fallback icon theme in another style Where "style" is either color or symbolic variant of a given icon. The problem is therefore if say your prefered style is "Symbolic" and you choose a Color-only icon theme. In such a configuration, all icons which are also available in the system theme with a symbolic variant will be used from the system theme (even when they are actually available in the chosen icon theme too, yet in a color variant) and you get a weird mix of part of the icons as symbolic from system theme and another part as color from the chosen theme. In order to avoid this weird situation, we only set -gtk-icon-style CSS value to the prefer-symbolic-icons property if the chosen icon theme has both style variants. Otherwise we force the only variant of the chosen icon theme. The icon "gimp-wilber" is used to determine whether an icon theme has both variants, which should be documented in the developer website for icon theme makers.
36 lines
1.4 KiB
C
36 lines
1.4 KiB
C
/* GIMP - The GNU Image Manipulation Program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* icon-themes.h
|
|
* Copyright (C) 2015 Benoit Touchette
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __ICONS_THEMES_H__
|
|
#define __ICONS_THEMES_H__
|
|
|
|
|
|
void icon_themes_init (Gimp *gimp);
|
|
void icon_themes_exit (Gimp *gimp);
|
|
|
|
gchar ** icon_themes_list_themes (Gimp *gimp,
|
|
gint *n_themes);
|
|
GFile * icon_themes_get_theme_dir (Gimp *gimp,
|
|
const gchar *theme_name);
|
|
|
|
gboolean icon_themes_current_prefer_symbolic (Gimp *gimp);
|
|
|
|
|
|
#endif /* __ICONS_THEMES_H__ */
|