mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
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
|
HitTestPreview TrackSelectHandle::Preview
|
||||||
(const TrackPanelMouseState &, AudacityProject *project)
|
(const TrackPanelMouseState &, AudacityProject *project)
|
||||||
{
|
{
|
||||||
const auto trackCount = TrackList::Get( *project ).Leaders().size();
|
|
||||||
auto message = Message(trackCount);
|
|
||||||
if (mClicked) {
|
|
||||||
static auto disabledCursor =
|
static auto disabledCursor =
|
||||||
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
|
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
|
||||||
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
||||||
static auto rearrangeCursor =
|
static auto hoverCursor =
|
||||||
::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
::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) {
|
||||||
const bool unsafe =
|
const bool unsafe =
|
||||||
ProjectAudioIO::Get( *project ).IsAudioActive();
|
ProjectAudioIO::Get( *project ).IsAudioActive();
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
(unsafe
|
(unsafe
|
||||||
? &*disabledCursor
|
? &*disabledCursor
|
||||||
: &*rearrangeCursor)
|
: &*clickedCursor)
|
||||||
// , message // Stop showing the tooltip after the click
|
// , message // Stop showing the tooltip after the click
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -169,7 +171,7 @@ HitTestPreview TrackSelectHandle::Preview
|
|||||||
static wxCursor arrowCursor{ wxCURSOR_ARROW };
|
static wxCursor arrowCursor{ wxCURSOR_ARROW };
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
&arrowCursor,
|
&*hoverCursor,
|
||||||
message
|
message
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user