-
-
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
Redesign of the Controller Rack #2944
base: master
Are you sure you want to change the base?
Conversation
src/gui/widgets/ControllerView.cpp
Outdated
int titleBarHeight = 24; | ||
QPainter p( this ); | ||
QRect rect( 1, 1, width()-2, titleBarHeight + 5 ); | ||
QLinearGradient grad( QPoint( 0, 0 ), QPoint( 0, 24 ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole thing could be avoided if you just use the background property in css and define it in css. In the end you'd set the rectrangle fill to
p.fillRect( rect, painter.background() );
I think the controllers should be centered in the window. |
I try to change the width() of the window depending of needing a scrollbar or not. |
I updated this. The window width relates now on the need of a scrollbar. |
src/gui/widgets/EffectView.cpp
Outdated
this, SLOT( closeEffects() ) ); | ||
|
||
m_subWindow->hide(); | ||
if( !(m_controlView->windowTitle() == "Peak Controller") ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should find a more elegant way to identify the peak controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more elegant way to identify the peak controller
Research points to dynamic_cast
against PeakController
and checking for != NULL
src/gui/widgets/EffectView.cpp
Outdated
@@ -111,7 +112,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : | |||
m_controlView = effect()->controls()->createView(); | |||
if( m_controlView ) | |||
{ | |||
if( !(m_controlView->windowTitle() == "Peak Controller") ) | |||
if( dynamic_cast<PeakControllerEffectControlDialog*>( m_controlView ) == NULL ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove the Q_OBJECT macro from PeakControllerEffectDialog otherwise I get a linker error. Actually the Q_OBJECT macro isn't needed because there is no Signal/Slot stuff in this class. and everything works fine. But eventually someone can look into this.
This one will be not ready before 1.2 is released. I'm targeting 1.3. |
Yes, I made a PR for this : #3240 |
@BaraMGB 1.) Currently you can change the names of the controllers, will you still be able to offer this? Again I have not used this feature much yet so you and others would be able to answer if these above questions are helpful or not. |
@BaraMGB works perfectly now! 👍 |
@PhysSong do you have time for a look at this? |
I think you should export -class ControllerRackView : public QWidget, public SerializingObject
+class LMMS_EXPORT ControllerRackView : public QWidget, public SerializingObject |
I guess the main problem I have with this pull request is located in the Furthermore, I had to remove the Q_OBJECT macro from the I don't know how to solve these problems. I would be very happy about help. |
@BaraMGB I will try to help you this weekend. |
Linux Mint 64 I had a lot of trouble setting this up, maybe because I don't know what I'm doing yet. I do have a working version on my computer now. I cloned LMMS/lmms and rebased from this branch. Had trouble with cmake, and had to resolve conflicts during the rebase. I had to add Also got a message when first compiling, something about no classes for |
|
||
#include "EffectControlDialog.h" | ||
#include "plugins/peak_controller_effect/peak_controller_effect.h" | ||
#include "plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you include "embed.h"
and <QIcon>
and then change line 42 to:
setWindowIcon( QIcon(embed::getIconPixmap( "controller" )) );
instead of including peak_controller_effect_control_dialog.cpp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand. Please, can you elaborate? Have you tested your suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes when I remove the .cpp include it fails compiling with: error: 'embed' has not been declared
.
So I added #include "embed.h"
. Then it fails because setWindowIcon
aspects a QIcon
but a QPixmap
is given.
So that's why also included <QIcon>
and changed the setWindowIcon
line.
After that it compiles and works fine here.
Also, not sure if I made a mistake when resolving conflicts... (I remember being unsure about one line of code) but I can confirm, as mentioned by @zonkmachine in #3240 that it's possible to make the Controller Rack window disappear by grabbing the bottom frame and moving up. Edit ---- So I started experimenting a bit and came up with this line: To be placed after the last command in: |
@tecknixia probably it's simpler to checkout the branch directly instead of trying to merge it into your master? To fix merge conflicts can be hard. |
@BaraMGB oh... it's a branch... that makes sense 🤣 newbie mistake. |
Man, this looks great, does anyone know if this is still planned on being added to LMMS? |
I wrote this 4 years ago. This is really old code now and it would be complicated to understand what I made. If lmms want to have a single window interface, something like this is needed to catch all the floating controler windows (MDI subwindows) in a rack. Unfortunately I don't have the time to bring this to an end. I would be happy if someone would like to take over the project. |
now that the rework is about to finish, i think it's about time to pick this back up. |
I have resolved conflicts and also made minor code improvements on my fork. @BaraMGB Do you want to enable "Allow edits from maintainers", or should I close this and open a new one? If you want, you can also pull from my fork. |
Peak controller and LFO controller will be inserted directly in the controller Rack. So we can avoid a lot of floating windows. In my opinion the rack makes more sense in this way.