mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 23:49:28 +02:00
Better cursors for sub-view rearrangement
This commit is contained in:
parent
e14c9538ad
commit
a95838a3e8
@ -16,6 +16,7 @@
|
||||
|
||||
#include "Cursors32/DisabledCursor.xpm"
|
||||
#include "Cursors32/RearrangeCursor.xpm"
|
||||
#include "Cursors32/RearrangingCursor.xpm"
|
||||
#include "Cursors32/EnvCursor.xpm"
|
||||
#include "Cursors32/TimeCursor.xpm"
|
||||
#include "Cursors32/IBeamCursor.xpm"
|
||||
|
38
images/Cursors32/RearrangingCursor.xpm
Normal file
38
images/Cursors32/RearrangingCursor.xpm
Normal file
@ -0,0 +1,38 @@
|
||||
/* XPM */
|
||||
static const char * const RearrangingCursorXpm[] = {
|
||||
"32 32 3 1",
|
||||
" c #FF0000", // mask color = RGB:255,0,0
|
||||
". c #000000",
|
||||
"+ c #FFFFFF",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .. .. .. ",
|
||||
" .++.++.++.. ",
|
||||
" .++++++++++. ",
|
||||
" ..++++++++++. ",
|
||||
" .+.+++++++++++. ",
|
||||
" .+.+++++++++++. ",
|
||||
" .+++++++++++++. ",
|
||||
" .+++++++++++++. ",
|
||||
" .+++++++++++++. ",
|
||||
" .+++++++++++++. ",
|
||||
" .+++++++++++. ",
|
||||
" .++++++++++. ",
|
||||
" .++++++++. ",
|
||||
" ..++++.. ",
|
||||
" .... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
@ -488,6 +488,8 @@ public:
|
||||
return RefreshNone;
|
||||
}
|
||||
|
||||
bool Clicked() const { return !mHeights.empty(); }
|
||||
|
||||
enum DragChoice_t{ Upward, Downward, Neutral };
|
||||
|
||||
DragChoice_t DragChoice( const TrackPanelMouseEvent &event ) const
|
||||
@ -561,10 +563,13 @@ public:
|
||||
HitTestPreview Preview(
|
||||
const TrackPanelMouseState &state, AudacityProject * ) override
|
||||
{
|
||||
static wxCursor cursor{ wxCURSOR_HAND };
|
||||
static auto hoverCursor =
|
||||
::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
||||
static auto clickedCursor =
|
||||
::MakeCursor(wxCURSOR_HAND, RearrangingCursorXpm, 16, 16);
|
||||
return {
|
||||
XO("Click and drag to rearrange sub-views"),
|
||||
&cursor
|
||||
Clicked() ? &*clickedCursor : &*hoverCursor
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user