Forums
Hi Rui, if you want to incorporate it it seems to work fine.
I just had to add the setCursor to your implementation.
Attached is qtractorMidiEditorForm.cpp
___Note:
I have also implemented the click animation (2px cursor offset). Curiously, the cursor size had to be increased for it to work. It doesn't work with native icons but it does with the theme icons. This is certainly a minor thing, and also a bit of a mystery.
___
line 717
if (!pOptions->bMidiEditMode) { m_ui.editModeOffAction->setChecked(true); m_pMidiEditor->unsetCursor(); } else { if (!pOptions->bMidiEditModeDraw) { m_ui.editModeOnAction->setChecked(true); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeOn").pixmap(32), 3, 20)); } else { m_ui.editModeDrawAction->setChecked(true); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeDraw").pixmap(32), 3, 20)); } }
line 1579
// Toggle edit-mode on. void qtractorMidiEditorForm::editModeOn ( bool bOn ) { // m_pMidiEditor->setEditModeDraw(false); if (bOn && m_pMidiEditor->isEditMode() && !m_pMidiEditor->isEditModeDraw()) { m_ui.editModeOffAction->setChecked(true); m_pEditModeToolButton->setDefaultAction( m_pEditModeActionGroup->checkedAction()); m_pMidiEditor->setEditMode(false); m_pMidiEditor->unsetCursor(); } else { m_pMidiEditor->setEditModeDraw(!bOn); m_pMidiEditor->setEditMode(bOn); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeOn").pixmap(32), 3, 20)); } m_pMidiEditor->updateContents(); stabilizeForm(); } // Toggle edit-mode off. void qtractorMidiEditorForm::editModeOff ( bool bOn ) { // m_pMidiEditor->setEditModeDraw(false); if (bOn && !m_pMidiEditor->isEditMode()) { if (m_pMidiEditor->isEditModeDraw()) { m_ui.editModeDrawAction->setChecked(true); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeDraw").pixmap(32), 3, 20)); } else { m_ui.editModeOnAction->setChecked(true); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeOn").pixmap(32), 3, 20)); } m_pEditModeToolButton->setDefaultAction( m_pEditModeActionGroup->checkedAction()); m_pMidiEditor->setEditMode(true); } else { m_pMidiEditor->setEditMode(!bOn); m_pMidiEditor->unsetCursor(); } m_pMidiEditor->updateContents(); stabilizeForm(); } // Toggle draw-mode (notes) void qtractorMidiEditorForm::editModeDraw ( bool bOn ) { // m_pMidiEditor->setEditModeDraw(bOn); if (bOn && m_pMidiEditor->isEditMode() && m_pMidiEditor->isEditModeDraw()) { m_ui.editModeOnAction->setChecked(true); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeOn").pixmap(32), 3, 20)); m_pEditModeToolButton->setDefaultAction( m_pEditModeActionGroup->checkedAction()); m_pMidiEditor->setEditModeDraw(false); } else { m_pMidiEditor->setEditModeDraw(bOn); m_pMidiEditor->setCursor(QCursor(QIcon::fromTheme("editModeDraw").pixmap(32), 3, 20)); m_pMidiEditor->setEditMode(bOn); } m_pMidiEditor->updateContents(); stabilizeForm(); }
File attachments
New Drupal bug detected
The new drupal does not show attachments in the topic header. I attached qtractorMidiEditorForm it in this comment.
re. New Drupal bug detected...
yeah, but they show up when editing the topic though, or doesn't it?
hmm...
EDIT: fixed now (see above). thanks
re. Cursor on tool selection implemented...
hi, thanks
one thing, you'll need to test as well, is how the cursor behaves in presence to keyboard modifiers like [Shift] and/or [Ctrl] and whether it resets to correct shape when entering or leaving the modified mode, view panes, windows and what not...
IIRC. it used to get stuck on some erroneous cursor shape at random, which is far worse than the current status quo. :)
cheers
UPDATE: in a slightly different approach, yet applicable when hovering the proper view-ports only, please check qtractor >= 1.5.2.11git.fd8b93 [develop]. thanks
It works, but it's not perfect
It only updates when you move the mouse. And that can be confusing.
When you activate from keyboard shortcuts you get the feeling that the tool hasn't changed.
Could the new "setEditCursor" method be used from qtractorMidiEditorForm.cpp?
The same thing I've done but using the setEditCursor method instead of the generic setCursor, and so it would update with any changes immediately only in the areas it should.
I've tried it and it doesn't work... Getting it would be the perfect experience.
But if it can't be done, what's already there is a great improvement and I'm grateful :).
re. It works, but it's not perfect...
EDITED: what about now? qtractor >= 1.5.2.11git.fd8b93 [develop]
hth.
UPDATE:. the couple of previous commits announced earlier have been squashed into a single one, in [develop] branch: please run
git reset --hard origin/develop
to the rescue; my apologies for the inconvenience, thanks.Is there some dependency on…
Is there some dependency on one or more icons here? I just compiled from the develop branch in order to take a look and am seeing odd behavior. When setting the mode to write, my cursor just disappears.
ah, I see... it does use…
ah, I see... it does use the icons provided by the VTQ themes. Excellent. I understand now. Are there any plans to add a default set of icons to support this feature?
Also, may be worth pointing out, adding notes feels much more "accurate" now. I don't know if it's the design/position of the edit mouse cursor, the "offset", or both but it really is good and accurate!
re. Is there some dependency on…
are you still rooting on your dumb transparent/blank icons?
don't make us repeat this nuisance all over again :/
Rui,Not going to deal with…
Rui,
Not going to deal with your attitude today. I've been down this road with you a number of times and you have yet to grow the !@%$!%$ up and realize not everyone is a fanboy of your relic icons being splashed all over their desktops like we're running windows 3.1 or something. Your ugly and bloated icons being littered all over the place is YOUR baggage and some of us use and maintain a clean environment.
So tired of your childish mood swings.
All you had to do was mention
clipEdit.png
is used. I'll consider adding that one back in but believe me, I'll be keeping every other blank icon as I don't need the ridiculous bloat which I've generously spoken about at length in the past. You're just too emotionally tied to that bloat to realize where it doesn't add value.Also, the only reason I'm even remotely interested in this addition is it (finally) provides a solution to the mess you left behind when you created a dependency on a toolbar that shows the state of the cursor. Remember when I pointed that one out? So completely ridiculous how at ease you were with the stupid decision to force users to look away from what they're editing to consult in icon in an OPTIONAL toolbar just to know....... no really, THAT was just amateur hour right there.
So thank you to G3N-es for putting this together to clean up that mess.
re. edit mode icons...
you asked:
there are no plans because the icons were already there (since early 90's :))
EDIT: and the icons are
editModeOn
andeditModeDraw
(clipEdit has nothing to do with this topic).Works well, feels cool :)
Thanks a lot Rui. This greatly improves the editing experience. It seems like something unimportant but it's not.
As @windowsrefund says, it feels much more precise and there's no noise... you know at all times what you're doing.
@windowsrefund, as you may have noticed, just delete "editModeOn" and "editModeDraw" from your theme. The default ones will appear.
If you want some more in line with Grayscale, in the Material icons (by Google) I shared on the forum, you already have "editModeOn" and "editModeDraw" prepared.
https://www.rncbc.org/drupal/sites/default/files/Material_Pack_Icons2.z…
They are in SVG, if you want them in PNG you just have to open them in Gimp and adjust the brightness.
As I said there, in the end I didn't include them in VTQs because they didn't quite convince me. It was a quick way to get an idea of how single-color, cut-out symbolic icons would look.
Anyway, I encourage you to create your own "pencil" and "pencil with line" in inkscape or gimp (it's a simple concept and drawing). It will always be the best option.
We can include our own icons. Rui has allowed and implemented it... (reflective ellipsis).
Related:
There is one thing that still bothers me a lot in the editor, and that is not being able to see the note I press on the physical midi controller reflected in the piano roll.
I know it also seems silly, but not having that reference (at least for me) is very irritating.
I will try to get it :)
Add new comment