otfried / ipe

The Ipe extensible drawing editor
http://ipe.otfried.org
149 stars 13 forks source link

Replace icons by icon sets that look good at all resolutions #226

Closed soukhinov closed 4 years ago

soukhinov commented 5 years ago

On Mac computer with Retina display low resolution is mixed with high resolution.

Half of menu buttons are low-res, half are high-res.

On canvas, selected object is high-res, other objects are low-res. Text labels are low-res.

screenshot 2019-02-27 at 10 34 13
otfried commented 5 years ago

When toolbar icons are not in high-resolution, that means that I do not have the right icon in better resolution. Please feel free to find (or make) some that I can use. For a full set, I need 22x22, 44x44, 32x32, and 64x64 pixels, or SVG or Ipe vector format that I can then render at the right size.

otfried commented 5 years ago

Thanks for reporting the problem with objects in low resolution. This worked correctly in Ipe 7.2.7, and I didn't change any of the code of the Cocoa canvas, so I suspect it may be a bug in the Cairo library. Let me check if going back to an old Cairo version fixes it.

otfried commented 5 years ago

i've decided to use Cairo differently, and this seems to work around the problem.

Willem3141 commented 5 years ago

I would be happy to try and design SVG icons for Ipe's drawing tools, based on KDE's Breeze icon set, if you like those.

(I'm quite busy at the moment, though, so it will take some time.)

otfried commented 5 years ago

I would be happy to try and design SVG icons for Ipe's drawing tools, based on KDE's Breeze icon set, if you like those.

That would be wonderful.

There is no hurry, we have been living with these icons for a long time.

otfried commented 5 years ago

It was pointed out to me that the current icons are hard to see in OSX dark mode and on the touch bar. So when redesigning them, one could try to improve this (or have a separate set for dark mode/touch bar).

nathaniel commented 5 years ago

Attaching my image of the poor visibility of current snapping buttons in Mac OS touchbar.

2019-03-06 08 01 29

otfried commented 5 years ago

I would be happy to try and design SVG icons for Ipe's drawing tools, based on KDE's Breeze icon set, if you like those.

(I'm quite busy at the moment, though, so it will take some time.)

Any progress on this?

Willem3141 commented 5 years ago

Unfortunately not yet, sorry... I'm still planning on doing it though, I'll start working on it next weekend.

otfried commented 4 years ago

Any news on this? :grin:

Willem3141 commented 4 years ago

I'm so sorry for procrastinating on this so much... but I finally made a first version of the mode icons (that is, the second toolbar):


image

(size 22x22)


image

(size 48x48)


image

(dark theme)


In some icons I tried to improve the metaphor, to make them clearer. If you don't like that, I can also try to stay closer to the original icon.

For reference: the icons mode_select, mode_translate, mode_pan, mode_shredder, and mode_ink are from Breeze. The others are custom-made.

Let me know what you think!

otfried commented 4 years ago

No need to feel bad, I'm also working on this in my free time only (and you may have noticed that it took me five years to fix your issue #32 ...

These look very nice, I'm looking forward to trying them out. Did you make them in SVG, or did you actually make bitmaps for the small size?

Does the MacOS tiff format actually support versions for light and dark UI, or does Ipe need to decide which one to load - I'll need to look that up.

Willem3141 commented 4 years ago

Thank you, also for that bugfix and the other recent Ipe improvements :slightly_smiling_face:

Did you make them in SVG, or did you actually make bitmaps for the small size?

They are indeed SVG files, which I drew in Ipe and then exported using iperender -svg -nocrop. To generate the light and dark variants, I used two Ipe style sheets with different color values. Here are the Ipe and SVG files, if you'd like to try them out: ipe-icons-v1.zip.

I made the screenshots above by editing appui_qt.cpp, method prefsIcon(), to simply add the SVG file to the QIcon. In other words, I did not have to render them to bitmaps myself.

Does the MacOS tiff format actually support versions for light and dark UI, or does Ipe need to decide which one to load - I'll need to look that up.

Unfortunately I don't have any experience developing for MacOS, so I cannot help with that.

What I do know is that, on KDE / Plasma systems, Qt applications can dynamically recolor icons to arbitrary color schemes because of an embedded stylesheet in the SVG files (i.e., the icons use symbolic color values in the SVG file, and can then be recolored by the application). In this case, no code in Ipe would be necessary to detect dark themes. I could make such SVG files with an embedded stylesheet, which could ship with the Qt version of Ipe?

otfried commented 4 years ago

Hah, Ipe is becoming established as an icon editor (I know at least one company whose icons are Ipe-made :-)

Since I have to support three platforms, I'd rather not do anything Qt-specific with styled SVG-files. In fact I'm tempted to simply ship Ipe with the icons in an Ipe-file - Ipe could render it to SVG for Qt on demand, and the other platforms could just render to bitmaps, after applying the appropriate style for dark mode. Let me think about this.

I'm looking forward to the remaining icons! :grinning:

otfried commented 4 years ago

image

I've tried what I just said: this is on Windows, where the icons are rendered directly from the Ipe file.

It seems to work well, and the user can now rescale the toolbar smoothly.

otfried commented 4 years ago

Another question: how did you get Ipe to show the dark theme? Did you just take out the line

unsetenv("QT_QPA_PLATFORMTHEME");

from main_qt.cpp ?

I wonder if we can kill this line now. It was needed because #42 - hopefully Ubuntu have fixed their act by now?

otfried commented 4 years ago

I have now taken the remaining edit icons from the breeze icon set, and I'm redrawing the snap icons following your template. (You can always improve them later if you still have energy.)

Thanks!