-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Qt's Resource System #1742
Use Qt's Resource System #1742
Conversation
Conflicts: src/gui/MainWindow.cpp src/gui/embed.cpp
Conflicts: src/core/BBTrackContainer.cpp src/gui/editors/AutomationEditor.cpp src/tracks/Pattern.cpp
Support for generated .rc files was added in CMake v2.8.9 to the QT4_ADD_RESOURCES macro. In order to support older versions of CMake, this commit includes the source of the new macro from v2.8.9 and uses it if necessary.
@lukas-w Seems pretty great! I'll do some testing if I get the time. |
If plugins had the ability to offer icons for each we should consider displaying them. I understand the GUI has no such place for these currently, but the idea has value. For example, browsing FX plugins by name leaves a bit to be desired from a UI perspective. |
Quite a bit of code cleanup here. Nice work @lukas-w. As I understand it, this means we now specify the file extension for our pixmaps. Does this consequently introduce the availability of SVG artwork now? I've reviewed the changes from a code perspective and they look great. 👍 -Tres |
Nice work lukas :) I do like the Qt resource system.
According to the Qt documentation you cant load a svg directly into a QPixmap. If I am reading it correctly The Qtmodule that handles svg is not GPL, but someone else should read that before taking my word for it. http://qt-project.org/doc/qt-4.8/qtsvg.html.
I do like this idea, a picture paints a thousand words as they say. There are a few things that would need to be sorted. currently we display all plugin effects in a single list, native, Ladspa and vst and hopefully more formats to be supported in the future. Not all these formats support icons iirc. As Lukas has already pointed out most of the native plugins use the same icon (yes im guilty of this) So we would need to produce these. |
Gonna test here! Amazing Yak-Shaving skills :-) |
@lukas-w It is really hard to review the changes when your editor automatically fixes code style. |
Yeah, sorry for that. It was too late when I noticed it. |
@tresf "Does this consequently introduce the availability of SVG artwork now?" No, because we already have that ability - it was implemented by Raine some time ago. We just haven't utilized it yet. |
👍 |
New approach: #1891 |
LMMS has been using some custom code found in
bin2res.cpp
to embed resources like pixmaps in binary files. This PR removes that code and introduces the use of the resource system provided by Qt instead (http://qt-project.org/doc/qt-4.8/resources.html).That means embedded resources are now available through Qt's classes:
Qt's Resource System reads a list of files to embed from a
.qrc
file that looks something like this:I didn't want to write all those files for every single plugin, so I wrote a CMake script that generates them instead, see
GenQrc.cmake
. It works like this:Also, a lot of plugins had the same "logo" (shown below) included that wasn't even visible in the UI. I removed those files in ec5b10b.

There's no direct user benefit in this, it's just some sort of cleaning up. Nevertheless, the changes are quite huge, so it'd be great if we could get a few people to test if all plugins' pixmaps/logos still load correctly, especially when using different themes.