Change cursors for rearranging of tracks...
... To be consistent with the rearranging of sub-views, and with general UI guidelines. The hover cursor is an open hand, and the dragging cursor is the closed hand.
This commit is contained in:
parent
73fd60543d
commit
72f20d9129
|
@ -144,22 +144,24 @@ UIHandle::Result TrackSelectHandle::Drag
|
|||
HitTestPreview TrackSelectHandle::Preview
|
||||
(const TrackPanelMouseState &, AudacityProject *project)
|
||||
{
|
||||
static auto disabledCursor =
|
||||
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
|
||||
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
||||
static auto hoverCursor =
|
||||
::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
||||
static auto clickedCursor =
|
||||
::MakeCursor(wxCURSOR_HAND, RearrangingCursorXpm, 16, 16);
|
||||
|
||||
const auto trackCount = TrackList::Get( *project ).Leaders().size();
|
||||
auto message = Message(trackCount);
|
||||
if (mClicked) {
|
||||
static auto disabledCursor =
|
||||
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
|
||||
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
||||
static auto rearrangeCursor =
|
||||
::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
||||
|
||||
const bool unsafe =
|
||||
ProjectAudioIO::Get( *project ).IsAudioActive();
|
||||
return {
|
||||
message,
|
||||
(unsafe
|
||||
? &*disabledCursor
|
||||
: &*rearrangeCursor)
|
||||
: &*clickedCursor)
|
||||
// , message // Stop showing the tooltip after the click
|
||||
};
|
||||
}
|
||||
|
@ -169,7 +171,7 @@ HitTestPreview TrackSelectHandle::Preview
|
|||
static wxCursor arrowCursor{ wxCURSOR_ARROW };
|
||||
return {
|
||||
message,
|
||||
&arrowCursor,
|
||||
&*hoverCursor,
|
||||
message
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue