GNOME Bugzilla – Bug 745835
Resize icons as Option, not theme
Last modified: 2018-05-24 15:05:42 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.
Icon themes sh0ould be able to achieve that.
(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.
Isn't this bug report a duplicate of bug #754442? https://bugzilla.gnome.org/show_bug.cgi?id=754442
yes, but this bug is older.
*** Bug 754442 has been marked as a duplicate of this bug. ***
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).
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?
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!
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).
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?
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.
(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.
*** Bug 774995 has been marked as a duplicate of this bug. ***
*** Bug 754552 has been marked as a duplicate of this bug. ***
So, do we think this should go in as-is, or does the patch need adjustments?
(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 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.
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…
*** Bug 780287 has been marked as a duplicate of this bug. ***
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.
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.
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.
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.
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.
Putting back to 2.10 milestone. We decided to simply put the very import bugs as blockers.
-- 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.