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 745835 - Resize icons as Option, not theme
Resize icons as Option, not theme
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: User Interface
2.8.14
Other All
: Normal enhancement
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
: 754442 754552 774995 780287 (view as bug list)
Depends on: 781020
Blocks:
 
 
Reported: 2015-03-08 11:18 UTC by Jo
Modified: 2018-05-24 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow icon size configuration through preferences. (21.20 KB, patch)
2016-01-07 04:18 UTC, Jehan
none Details | Review
New patch with a new widget. (30.59 KB, patch)
2016-03-26 01:17 UTC, Jehan
needs-work Details | Review

Description Jo 2015-03-08 11:18:15 UTC
please add small icons not as theme, but as option in Gimps general options. 

Furthermore, i'd welcome a small theme-wizard to customize the user interface appearance with the colors i like most, (buttons, all kind of text, monocrome or colored icons, small or bigger icons ect.) so that installing and tweaking themes becomes easy and painless, instead to search existing themes with tons of variables and the wast of time that follows tweaking those settings to the own like.
Comment 1 Michael Schumacher 2015-05-20 21:56:33 UTC
Icon themes sh0ould be able to achieve that.
Comment 2 Jo 2015-06-10 20:09:58 UTC
(In reply to Michael Schumacher from comment #1)
> Icon themes sh0ould be able to achieve that.

i found not much themes on the web, and those are usually very similar one to another. Furthermore, its hard to get a preferred one, because everybody has its own preferences. And modifying existing themes is very complicated. 
To clean up with all that "old mess" id welcome a wizard for the Gimp, so that everyone could customize his work tool at his liking and needs. (color, fonts, spaces, icon size)
Most pro apps have such a feature.
Comment 3 tobias 2015-12-08 13:00:34 UTC
Isn't this bug report a duplicate of bug #754442?

https://bugzilla.gnome.org/show_bug.cgi?id=754442
Comment 4 Michael Natterer 2015-12-08 14:38:08 UTC
yes, but this bug is older.
Comment 5 Michael Natterer 2015-12-08 14:39:08 UTC
*** Bug 754442 has been marked as a duplicate of this bug. ***
Comment 6 Jehan 2016-01-07 04:18:08 UTC
Created attachment 318399 [details] [review]
Allow icon size configuration through preferences.

The attached patch allows to override icon sizes as a preferences option. It has been implemented with an "icon-size" property on GimpGuiConfig.

This first commit only updates the toolbox icons, but more should come (dockbook icons' size too should be overriden by this property).

This patch allows 4 values: "small" (will make "Small" theme useless), "medium" (as in current Default theme), but also "large" and "huge" (these 2 should be useful for HiDPI screens). Of course, to make use of the "large" and "huge" values, we will need to have more sizes of some of our icons (or use SVG icons, which is a WIP for our symbolic icons).
Comment 7 Kevin Payne 2016-01-22 20:42:50 UTC
I like the idea that the icon sizes are selectable from preferences, but that leaves me wondering how to know what sizes will be needed for each of the icons in the theme (until SVG icons are fully supported)

Or will we have to take the easy route and make the themes have all the icons at all of the sizes?
Comment 8 Jehan 2016-03-26 01:17:22 UTC
Created attachment 324780 [details] [review]
New patch with a new widget.

Mitch > I made a widget as you asked me on IRC some time ago. Apart from this, this is basically the same code pushed in its own widget.

Kevin > making all icons in all size does not seem to me like the "easy" route. Well unless we had many icon designers who love tweaking icons at every size, I guess. But I doubt we'd find such a designer.

Anyway some icon sizes are updated not with numbers, but with a GtkIconSize (for instance tool icon sizes are set with gtk_tool_palette_set_icon_size()). Though in GTK+2, there existed sizes 18 or 20 (cf. https://git.gnome.org/browse/gtk+/tree/gtk/gtkiconfactory.c?h=gtk-2-8#n863), and we actually use 22 in GIMP, I can notice that GTK+3 simplified with multiples of 16 and 24 only: https://developer.gnome.org/gtk3/stable/gtk3-Themeable-Stock-Images.html#GtkIconSize

So if you still want to do other versions of pixel-perfect icons, I suggest we switch to 24 for tool icons. This way, we will have pixel-perfect versions for every common size. Klaus has started to do 16x16 pixel-perfect icons, so maybe you can just do the 24x24 versions. Make bug reports with your 24x24 versions, add me in the CC list, and I will commit these.
Thanks!
Comment 9 Klaus Staedtler 2016-05-18 18:11:26 UTC
I recently did lots of 24x24 pixel-perfect icons. To my surprise gimp accepted (and prefered !) in most cases 24x24 over 16x16 or 22x22. So I've added in some cases 24x24px icons where they where missing (gimp had and has an tohuwabohu of 16, 22, and 24 px icons in some areas, something I wanted to change).

But yet another surprise ... 'gimp-paths' and 'gimp-histogram' are only displayed if they are in 16x16 or 22x22 (depending on theme) ...they can't be 24x24 (like e.g. gimp-navigation or gimp-selection).
Comment 10 Jehan 2016-06-14 15:17:00 UTC
Mitch > I know you were considering this was not the perfect way for the future on IRC, and in particular with the GTK+3 port, most if not all of this logic will go away. And I agree. But we are not in GIMP 3 yet. We will have some life span for GIMP 2.10 first. So here we have a (hackish, arguably) way to choose icon sizes until GIMP 3 is out, get rid of the "Small" theme, and have HiDPI people happy (or a little less unhappy, because yes obviously HiDPI GUI is not only about icons).

So I think it would be good to get this in. From memory, this only change the tool icons for now, but I will continue to implement this for other icons (docks, etc.) once this is reviewed and accepted. :-)
Could you review?
Comment 11 Ilia 2016-07-16 11:27:28 UTC
Why not using huge icons downsampling them to the desired pixel size with e.g. superior quality cairo graphics downsampling?
Furthermore, if the icons are monochrome, they can be drawn in the text color, making them compatible to all backgrounds.
Comment 12 Klaus Staedtler 2016-07-16 14:21:16 UTC
(In reply to Ilia from comment #11)
> Why not using huge icons downsampling them to the desired pixel size with
> e.g. superior quality cairo graphics downsampling?

Because smaller icons need to be pixel-perfect (otherwise they look blurry), down-sampling is more complicate than upsampling. Also huge icons tend to have much too many details, when downscaled this only makes unwanted 'noise'.

> Furthermore, if the icons are monochrome, they can be drawn in the text
> color, making them compatible to all backgrounds.

have a look at https://git.gnome.org/browse/gimp/tree/icons/Symbolic/symbolic-scalable.svg

there you can adjust the color of any icon in there any to desired color and shade by using the swatch-field. Unfortunately it is not up-to-date (and probably won't be, because it gets to big). Maybe I split it into 3 or 4 separate files (tool. preferences, stock ...) sometimes.
Comment 13 Michael Natterer 2016-11-24 11:43:56 UTC
*** Bug 774995 has been marked as a duplicate of this bug. ***
Comment 14 Jehan 2016-12-20 03:56:09 UTC
*** Bug 754552 has been marked as a duplicate of this bug. ***
Comment 15 Michael Schumacher 2017-02-19 17:29:43 UTC
So, do we think this should go in as-is, or does the patch need adjustments?
Comment 16 Jehan 2017-02-19 19:22:44 UTC
(In reply to Michael Schumacher from comment #15)
> So, do we think this should go in as-is, or does the patch need adjustments?

During Wilber Week, Mitch told me to just get this in. So I need to take a few hours to review my patch, and I may update a few things, then I'll push. I will try to do this next week or so.
Comment 17 Michael Schumacher 2017-02-19 19:25:06 UTC
Comment on attachment 324780 [details] [review]
New patch with a new widget.

Ok. Setting it to needs-work then, simply for the fact of its age and the possible changes you mentioned.
Comment 18 Jehan 2017-03-11 02:21:22 UTC
Ok I re-reviewed my own patch.

commit cfae83623cc291179a544ca8402e801596636f36
Author: Jehan <jehan@girinstud.io>
Date:   Thu Jan 7 05:09:01 2016 +0100

    Bug 745835 - Small icons as Option, not theme
    
    Allow overriding icon sizes set in themes from the preferences.
    This initial commit updates only toolbox icons. More to come.
    4 options are available: small, medium, large and huge (the later would
    likely be useful for HiDPI screens).
    Uses a new widget GimpIconSizeScale.

 app/config/config-enums.h        |  13 +++
 app/config/gimpguiconfig.c       |  14 +++
 app/config/gimpguiconfig.h       |   1 +
 app/config/gimprc-blurbs.h       |   3 +
 app/dialogs/preferences-dialog.c |   9 +-
 app/widgets/Makefile.am          |   2 +
 app/widgets/gimpiconsizescale.c  | 508 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 app/widgets/gimpiconsizescale.h  |  51 ++++++++++
 app/widgets/gimptoolpalette.c    | 143 +++++++++++++++++++++++++-
 app/widgets/widgets-types.h      |   1 +
 10 files changed, 739 insertions(+), 6 deletions(-)

-----------------------------------------------------

Then I added a few commits:

ommit e30c92ce914c9b5052b9ca9f68f1dd46099311f3
Author: Jehan <jehan@girinstud.io>
Date:   Sat Mar 11 02:42:10 2017 +0100

    app: also update dockbook tab borders with icon sizes.

 app/widgets/gimpdockbook.c | 52 ++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 42 insertions(+), 10 deletions(-)

commit 26f054e029468317f7c6973316ee00b9786c98b8
Author: Jehan <jehan@girinstud.io>
Date:   Sat Mar 11 01:40:15 2017 +0100

    app: GimpEditor styling depending on config's icon settings.
    
    Do not update only the icon, but also content and button spacing.

 app/widgets/gimpeditor.c | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 128 insertions(+), 23 deletions(-)

commit 86cd53e9e6cb402f74aaa805b8b849f034e1fb9c
Author: Jehan <jehan@girinstud.io>
Date:   Fri Mar 10 06:04:20 2017 +0100

    app: dockbook tab icon size depends on the icon settings.

 app/widgets/gimpdockbook.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 48 insertions(+), 4 deletions(-)

-----------------------------------------------------

I won't close yet because I have more to do. There are more icons and styling properties which should be updated. Consequently I think I will also move the settings widget in the themes tab, since it's not about icons only anymore.

More to come…
Comment 19 Jehan 2017-03-21 14:24:10 UTC
*** Bug 780287 has been marked as a duplicate of this bug. ***
Comment 20 Jehan 2017-03-21 23:21:11 UTC
More improvement:

commit d339aef75c457777a0bac53748d90a9130f4ac27
Author: Jehan <jehan@girinstud.io>
Date:   Fri Mar 17 05:52:20 2017 +0100

    app: add icon size auto-guess from monitor resolution.
    
    Current code only guess resolution for a single monitor. Ideally
    the widget sizes could be different depending on the window where a
    given widget is on. But that's a start.

I used the following PPI steps:

* [0-100] Small icons
* [100-192] Medium icons
* [192-300] Large icons
* [300+] Huge icons

192 comes from the auto-detection algorithm of gnome-settings-daemon which sets a scale of 2 for displays over 192 PPI.
Cf. https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/xsettings/gsd-xsettings-manager.c#n233
https://wiki.gnome.org/HowDoI/HiDpi

It doesn't look like there is automatic scale 3 or over, but there probably should so GIMP has the "Huge" size.
Comment 21 Jehan 2017-03-21 23:47:01 UTC
I wanted to add some font scaling support, but it turns out that even though GTK+2 doesn't have real HiDPI support, it will at least do the font scaling.

Font scaling simulation fails with GNOME tweak tool because it apparently doesn't configure the right settings (cf. bug 780378) but it works with GNOME auto-detection.

I am not sure about other desktops, in particular if they also set xsettings and if the toolkits use the same xsettings values as GTK+.

As for Windows or MacOS, I wonder how GTK+2 behaves on a GTK+ screen but according to bug 780287, comment 6, it may work fine on Windows 10 at least. Patrick David is building GIMP master right now to test it on a laptop with HiDPI screen with Windows.

If really a desktop/OS has no xsettings compliance, according to #gtk+, GTK+2 would fall back to the settings read from ~/.config/gtk-2.0/gtkrc, so this is a workaround we can tell people. At least we should not have to implement font scaling ourselves. Icon scaling is enough until GIMP 3.

Last thing I'd like to test before closing the bug report is having different icon sizes per screen. Wayland even have per-screen HiDPI settings, so if our icon can update as well, this would be perfect.
Comment 22 Jehan 2017-03-30 16:01:27 UTC
Current situation: fonts are fine on Windows too. Nobody to test MacOS with HiDPI yet. So that's the good news. We probably don't have to bother about font size.

The SVG icons are broken on Windows though. It feels like the support for SVG icons in GTK+ may not be very good on the Windows platform. Will have to look into this.
Comment 23 Jehan 2017-10-08 21:25:59 UTC
About my last comment, the broken fonts on Windows will be fixed on GTK+ 2.24.32. See bug 781020.
A warning had already been added in our configure and vector icons are disabled on Windows if one try to build with a lower version:

commit 8c10194614426a6f355509fafbf3560f80844cc5
Author: Jehan <jehan@girinstud.io>
Date:   Sat Apr 8 18:00:51 2017 +0200

    configure: disable vector icons on Windows with GTK+ < 2.24.32.
    
    SVG icons won't be properly displayed with an older GTK+. See:
    https://bugzilla.gnome.org/show_bug.cgi?id=781020
    Note: 2.24.32 is not out yet, but it will be the first stable release
    with the right fix.

 configure.ac | 51 +++++++++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 22 deletions(-)

------------------------------------------------------------

Meanwhile on MacOS, Kris tested for me some time ago, but I forgot to update the bug report. He also had problems with the icons, but it turned out that GIO was not getting the right type for SVG image. After testing "shared-mime-info" was necessary to do so. So I also added a test in our configure script, assuming that this package was necessary both for MacOS and GNU/Linux (untested to make sure, since this package is a protected one that I can't even uninstall on my OS, which explains likely why such issue never happened for Linux people).
For information, this package did not seem necessary for Windows support.

commit 6126437a44ee3d6d2b760a8ac2d616029040b978
Author: Jehan <jehan@girinstud.io>
Date:   Tue May 2 23:13:22 2017 +0200

    configure: shared-mime-info is necessary to detect SVG icons.
    
    It is apparently not used for file type detection on Windows since
    SVG detection worked correctly without installing this package. But
    vector icons end up broken under MacOS when this is not installed
    (thanks to Kris for testing this!). I assume this is necessary on
    GNU/Linux too.

 configure.ac | 44 +++++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 17 deletions(-)

------------------------------------------------------------

Last thing was that icons in bigger size are not always perfectly sharp. We'll have to look into this.
Comment 24 Jehan 2017-12-01 17:44:21 UTC
For info, this globally works well. We recently acquired a 13" laptop with QHD resolution which defaulted to the "LARGE" size of icons. Felt like a proper default.

What still could be improved:

- Sharpening icons for the various sizes. This can be done progressively. Even if the icons are not perfect, being vectorial makes them still better than previous state. Now GIMP is actually usable in the high DPI world.

- Having different size of icons for different screens.
This is a common problem when you have a display setup mixing resolutions (especially with some screen in high DPI and another not).
It would require an update of the GUI to choose independently size for every screen, and have various icon sizes applied to windows depending on their screen. And what when a window is partly on 2 screens?
Anyway I don't think we should even do this on GTK+2. Let's see again later when we are in GIMP 3.

- Bug 781020 was reopened because Edward found some cases where SVG files are still not properly detected on Windows. I added bug 781020 as a dependency of the current one.

Conclusion: I'll move this to 2.12. I think current support is good enough. Refinement of the icon scaling logics and data will happen progressively.
Comment 25 Jehan 2017-12-04 23:45:38 UTC
Putting back to 2.10 milestone. We decided to simply put the very import bugs as blockers.
Comment 26 GNOME Infrastructure Team 2018-05-24 15:05:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/652.