Closed flying-sheep closed 9 months ago
But this would be useful only for Linux, right?
But this would be useful only for Linux, right?
it would be most useful for linux at first yes.
it also allows us to let users on any platform use their icon set. they just have to specify a theme name and put the theme in a folder which we have prepended to the theme search path.
note that i was wrong (bug description above is now fixed): the last item in themeSearchPaths
already is ':/icons'
, so if we bundle our icons as qresources in this resource folder, we don’t have to do anything, just call QIcon.fromTheme('iconname')
. awesome! we just have to do that, give the icons cool names (e.g. let’s use breeze’s names if applicable) and it will just work!
and as said, this allows us to easily let the user unzip e.g. this into e.g. %appdata%\Spyder\icon-themes
and select “Faenza” in spyder’s config, even in e.g. windows (similarly in OSX):
if platform = 'win': # use different path for OSX
local_icon_dir = os.getenv('APPDATA')+ '/Spyder/icon-themes'
QIcon.setThemeSearchPaths([local_icon_dir] + QIcon.themeSearchPaths())
#now add combobox with available themes to select, and add documentation where to put the themes!
but anyway, not doing this or similar makes Spyder simply butt-ugly in the eyes of any linux user.
using the system icon theme is something we expect, not some fancy gimmick.
if you don’t use my approach, then don’t, but if you still want to support native themes on linux, i simply think it’s going to be a pain not to use this simple solution, but i’ll be happy however you solve this. at least as soon as i don’t see a single bundled icon anymore.
My thoughts:
I think it's better to make Spyder to look the same on all platforms
sorry, but not accepted. that’s appropriate for a website, not an application. fuck branding, and fuck “uniform” style which invariantly results in a hodgepodge of native and custom widgets anyway.
big no from me for this argument
i already made my choice for icon theme right in my system’s settings dialog. applications have to follow or are by definition standing out like sore thumbs.
I just wanted to stress that this is important.
a cross platform application should behave well on all platforms.
and on Linux this means:
I agree with @ccordoba12,
In general I would say, as you also point out, "a cross platform application should behave well on all platforms" that meaning: Cross Platform experience is on top of specific OS experience, which means having a compromise to make the project sustainable as well. Qt lowers the burden of development incredibly but there are so many things beyond the GUI (and even within it), so it does not mean that it has to look "perfect" in every single OS, but work.
which means having a compromise to make the project sustainable as well. Qt lowers the burden of development incredibly but there are so many things beyond the GUI (and even within it), so it does not mean that it has to look "perfect" in every single OS, but work.
my point is that with my approach, we leverage a built-in mechanism that can do everything you two want:
and on top of that also allows using the native icon theme without extra effort (what every linux user wants)
PS: did you have a look at breeze?
the action icons (i.e. what is used in a application toolbar/menubar/buttons) are on the bottom and have exactly the clean look you strive for. they also (other than font awesome AFAIK) have guidelines allowing to extend them with own icons matching the look.
i’d say that’s even better for your purposes, and allows you to achieve your goal very simply:
QIcon.fromTheme
As I said earlier, there is no problem with using Theme approach (the dev team is aware of this), still it would result in mixing icons from whatever theme is on the OS and breeze icons + customs icons (in case the OS theme does not have the icon).
How would this look good in all the different theme options available in Mac, Windows, and Linux?
Breeze Icons are cool, we will take a look.
Update:
Bear in mind that we choose this also based on the following:
github isn’t the big part of its story.
the icons are now a part of KDE, where they’ll be used to provide icons for many of those applications.
look e.g. into this directory. here’s the list of icons that start with “document”, “edit”, “debug”, “code”, “go”, “help”, and “run”, and are therefore useful for an IDE. (i’m sure there are more useful ones)
and the icons look flawless here on my Qt-only system…
document-close.svg
document-decrypt.svg
document-edit-decrypt-verify.svg
document-edit-decrypt.svg
document-edit-encrypt.svg
document-edit-sign-encrypt.svg
document-edit-sign.svg
document-edit-verify.svg
document-edit.svg
document-encrypt.svg
document-encrypted.svg
document-export-table.svg
document-export.svg
document-import.svg
document-new.svg
document-open-folder.svg
document-open-recent.svg
document-open-remote.svg
document-open.svg
document-preview-archive.svg
document-preview.svg
document-print-direct.svg
document-print-frame.svg
document-print-preview.svg
document-print.svg
document-properties.svg
document-revert.svg
document-save-all.svg
document-save-as.svg
document-save.svg
document-share.svg
document-sign.svg
debug-execute-from-cursor.svg
debug-execute-to-cursor.svg
debug-run-cursor.svg
debug-run.svg
debug-step-instruction.svg
debug-step-into-instruction.svg
debug-step-into.svg
debug-step-out.svg
debug-step-over.svg
code-block.svg
code-class.svg
code-context.svg
code-function.svg
code-typedef.svg
code-variable.svg
edit-bomb.svg
edit-clear-history.svg
edit-clear-list.svg
edit-clear-locationbar-ltr.svg
edit-clear-locationbar-rtl.svg
edit-clear.svg
edit-copy.svg
edit-cut.svg
edit-delete-shred.svg
edit-delete.svg
edit-find-mail.svg
edit-find-project.svg
edit-find-replace.svg
edit-find-user.svg
edit-find.svg
edit-guides.svg
edit-image-face-add.svg
edit-image-face-detect.svg
edit-image-face-recognize.svg
edit-image-face-show.svg
edit-link.svg
edit-node.svg
edit-paste.svg
edit-redo.svg
edit-rename.svg
edit-select-all.svg
edit-select.svg
edit-table-cell-merge.svg
edit-table-cell-split.svg
edit-table-delete-column.svg
edit-table-delete-row.svg
edit-table-insert-column-left.svg
edit-table-insert-column-right.svg
edit-table-insert-row-above.svg
edit-table-insert-row-below.svg
edit-text-frame-update.svg
edit-undo.svg
go-bottom.svg
go-down-search.svg
go-down.svg
go-first-view-page.svg
go-first-view.svg
go-first.svg
go-home.svg
go-jump-declaration.svg
go-jump-definition.svg
go-jump-locationbar.svg
go-jump-today.svg
go-jump.svg
go-last-view-page.svg
go-last-view.svg
go-last.svg
go-next-context.svg
go-next-use.svg
go-next-view-page.svg
go-next-view.svg
go-next.svg
go-previous-context.svg
go-previous-use.svg
go-previous-view-page.svg
go-previous-view.svg
go-previous.svg
go-top.svg
go-up-search.svg
go-up.svg
help-about.svg
help-contents.svg
help-contextual.svg
help-donate.svg
help-feedback.svg
help-hint.svg
run-build-clean.svg
run-build-configure.svg
run-build-file.svg
run-build-install-root.svg
run-build-install.svg
run-build-prune.svg
run-build.svg
Ok, we are not going to maintain this discussion forever. This is my final take on this:
Native themes (if supported) are not going to be the default. If people want them, then they'll have to:
a. Opt in to them. b. Put up the ugly mix of native and our own icons.
~/.ipython
and they are a much bigger project than us, so we have to learn from their path.@flying-sheep, I know you mean well, but please don't derail us more into this discussion.
One final thing: if someone else (besides @SylvainCorlay and @goanpeca) wants to implement native themes, he/she is welcome to make a pull request to make it happen, as long as he/she abides to the conditions mentioned above.
XDG is not going to happen. IPython guys decided to revert to ~/.ipython and they are a much bigger project than us, so we have to learn from their path.
please don’t take this as personal attack, but i really don’t understand your decision making.
if you follow some other person’s/project’s lead then you need to make sure the situations and problems are comparable.
they did it because they are dependent on users manually finding and editing the files. ipython consists of multiple parts that all draw from the same configuration. some are TUI, some GUI. some settings can’t easily be set from a GUI or make no sense in the GUI parts. a unified config editor would make no sense.
this project on the other hand is one application with a central configuration dialog.
whoever wants to find the config files does so because he/she needs something very specific not available in the GUI. that’s a special case, not (like in ipython) the best way to access them.
Don't worry, I know you're not attacking us :-)
Another reason for IPython to finally not go with XDG (and the most important one for me) is that is harder to point people to where configuration files reside, in a simple and multi-platform way.
I think that's a valid reason, and why I decided to not follow XDG either.
yes, i know! my point is that it’s a valid point for them, as they actually do have to point people to the config file on a regular basis, unlike us who point people to the settings dialog instead.
Ok, here are the different reasons for our choices so far:
Keeping this one open for now since there has been a lot of discussions here. Will probably close when some new icon set lands into Spyder.
good points, but i disagree about performance:
Qt renders the SVG icons once for every used size, and caches them. that hardly makes any impact.
also the restrictiveness with one color isn’t a good thing. when you look at the (sparingly used) color in the breeze icon set, you’ll see that it draws attention to the right things and is an improvement in terms of usability (especially for users over the age of 25) and distinction.
i’d rather have all people use it efficiently after 25ms more loading time than older users having to frustratingly search icons all the time.
could you please point me to the bug report about Qt4 having problems with SVG? and how that relates to different platforms?
I arrive a bit late in the discussion, sorry. I won't go against current conclusions, but I think it would be a good idea to at least follow the standard name for icons that exists, and find non-clashing names for the others, so that it's easier to go either way if we want to change our minds later. I don't know if it is (or can be made) compatible with Font Awesome, however. @flying-sheep since you seem to know the themes well, you could make a list of equivalences (or a PR applying the transformation). Helping is always more efficient than reporting (even if it is of course useful in its own right).
Another question is, what are other editors and IDE doing with their icons in Linux ? I suppose that Eclipse and Matlab use their own set of icons, but what is using kdevelop for its debug icons, for example ?
Finally, I head that svg in small sizes look bad because the details are blurred together instead of simplified. Could it be an additional problem ?
@flying-sheep since you seem to know the themes well, you could make a list of equivalences (or a PR applying the transformation). Helping is always more efficient than reporting (even if it is of course useful in its own right).
i like helping, but only if there’s a future to the work. as it looks now i’d like to have confirmation that using native icon themes will be an option before i do something pointless.
but what is using kdevelop for its debug icons, for example ?
KDevelop uses native icons only.
I head that svg in small sizes look bad because the details are blurred together instead of simplified.
that’s only if you use SVGs created for big resolutions. breeze aligns their icons according to a pixel grid of a certain size, e.g. the normal toolbar size 22×22 for actions (e.g. new file, copy, debug, run, draw rectangle) and additional sizes for other things like mime types (aka file icons)
when compare this with the font awesome examples (which are designed to look good for arbitrary sizes), breeze certainly looks sharper.
I am looking into the standard naming conventions from freedesktop, and I think that it is reasonable to use those names. It will make it easy to use Qt/KDE themes etc...
:+1:
@SylvainCorlay, great! In case you didn't follow the discussion above: I'd like this to be opt-in, i.e. users should select an option to use the KDE/Gnome icons.
I find the KDE icons for IDEs not so beautiful, so if people want to use them it has to be by their choice, not ours.
Agreed. Whether we use QIcon.fromTheme or not we will need a mapping from icon names and using standard ones will make any further changes easier.
great!
hi, i did a PR for another PyQt project where I implemented a qrc-based fallback/default theme that can be used via QIcon.fromTheme
: takluyver/nbmanager#10
it’s not hard, only the index.theme
files are a bit annoying.
So, on my system (Kubuntu Zesty) the icons look like hell on the dark theme that looks fine on ALL other apps on my system, including GTK apps. About half of the icons don't show up visible at all since they're the same color as the toolbar background, and changing the system icon theme does NOTHING since you're dead set on forcing YOUR choice of icons upon my desktop, unlike the other apps I use. I really LOVE Spyder IDE, but I'm going to have to switch back to using plain old Kate for Python development, since I'm not going to switch my entire desktop theme for one single app.
@bavarin-fleetfoot we are working on a unified theme that will work fine for dark and light apps, the work is a couple of months away
That's great news, because reading the thread for this enhancement request made it sound like there was strong pushback against the idea of supporting system/Qt standard icons because it would make things "ugly", which it already IS on any system that uses their desktop's built in theme options to change to a darker theme. This one factor of utterly unusable toolbars kills the usefulness of an otherwise fantastic app for me. If I have to guess what button I'm about to press, then there's no point in having a bunch of nice features, any of which might randomly cost me hours of work because I clicked the wrong invisible icon by mistake.
@bavarin-fleetfoot we have reviewed the suggestions and we are working on using from theme and the breeze icon theme by default. We will provide OS based look and unified look
It is a big refactor and that is why we have taken some time to do it
Right on. I'll leave it installed for easy updates until I can see the icons on the toolbar. Greatly looking forward to using Spyder again. Other than this one appearance issue (which honestly made no sense to me that it was even a problem), it's by far one of the better Python IDEs in existence.
@bavarin-fleetfoot The issue with qtawesome is the look on dark backgrounds?
No Sylvain, the main problem is Windows 10 forbids to load fonts not installed in the system, so we have to resort back to the Spyder 2 icon theme there.
So for Spyder 4 our plan is to use SVG icons instead, from the KDE theme called Breeze.
Does this work on Mac?
It's not possible for us to implement this feature at this point because we have several custom-made icons and we plan to add more in the future.
like discussed in #950, #2210 advances the icons.
so let’s do it right and use
QIcon.fromTheme
. we’ll have to simply':/icons'
.anywhere we want to use an icon, we just need to do
document-new
), it’ll automatically use system icons on linuxthis is the best of all worlds: