Bug 803 - Incorrect pointer (cursor) when rearranging tracks

There is no wxCURSOR_REARRANGE so made a custom cursor instead.
This commit is contained in:
James Crook 2019-08-18 14:47:17 +01:00
parent c65eb8fea5
commit 06af0c6296
3 changed files with 43 additions and 2 deletions

View File

@ -15,6 +15,7 @@
#include "Cursors32/DisabledCursor.xpm"
#include "Cursors32/RearrangeCursor.xpm"
#include "Cursors32/EnvCursor.xpm"
#include "Cursors32/TimeCursor.xpm"
#include "Cursors32/IBeamCursor.xpm"

View File

@ -0,0 +1,38 @@
/* XPM */
static const char * const RearrangeCursorXpm[] = {
"32 32 3 1",
" c #FF0000", // mask color = RGB:255,0,0
". c #000000",
"+ c #FFFFFF",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ... ",
" .++... ",
" ...++.++... ",
" .++.++.++.++. ",
" .++.++.++.++. ",
" .++.++.++.++. ",
" ...+++++++++++. ",
" .++.+++++++++++. ",
" .++.+++++++++++. ",
" .++.+++++++++++. ",
" .++++++++++++++. ",
" .++++++++++++++. ",
" .+++++++++++++. ",
" .+++++++++++++. ",
" .+++++++++++. ",
" .++++++++++. ",
" .++++++++. ",
" ..++++.. ",
" .... ",
" ",
" ",
" ",
" ",
" ",
" "};

View File

@ -150,7 +150,9 @@ HitTestPreview TrackSelectHandle::Preview
if (mClicked) {
static auto disabledCursor =
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
static wxCursor rearrangeCursor{ wxCURSOR_HAND };
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
static auto rearrangeCursor =
::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
const bool unsafe =
ProjectAudioIO::Get( *GetActiveProject() ).IsAudioActive();
@ -158,7 +160,7 @@ HitTestPreview TrackSelectHandle::Preview
message,
(unsafe
? &*disabledCursor
: &rearrangeCursor)
: &*rearrangeCursor)
// , message // Stop showing the tooltip after the click
};
}