mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-29 16:53:51 +01:00
Highlight TCP buttons
This commit is contained in:
@@ -1918,7 +1918,7 @@ void TrackInfo::CloseTitleDrawFunction
|
|||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
||||||
AColor::Bevel2(*dc, !down, bev, selected );
|
AColor::Bevel2(*dc, !down, bev, selected, hit );
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_THEMING
|
#ifdef EXPERIMENTAL_THEMING
|
||||||
wxPen pen( theTheme.Colour( clrTrackPanelText ));
|
wxPen pen( theTheme.Colour( clrTrackPanelText ));
|
||||||
@@ -1954,7 +1954,7 @@ void TrackInfo::CloseTitleDrawFunction
|
|||||||
pTrack ? pTrack->GetName() : _("Name");
|
pTrack ? pTrack->GetName() : _("Name");
|
||||||
|
|
||||||
//bev.Inflate(-1, -1);
|
//bev.Inflate(-1, -1);
|
||||||
AColor::Bevel2(*dc, !down, bev, selected);
|
AColor::Bevel2(*dc, !down, bev, selected, hit);
|
||||||
|
|
||||||
// Draw title text
|
// Draw title text
|
||||||
SetTrackInfoFont(dc);
|
SetTrackInfoFont(dc);
|
||||||
@@ -2024,7 +2024,7 @@ void TrackInfo::MinimizeSyncLockDrawFunction
|
|||||||
//AColor::MediumTrackInfo(dc, t->GetSelected());
|
//AColor::MediumTrackInfo(dc, t->GetSelected());
|
||||||
//dc->DrawRectangle(bev);
|
//dc->DrawRectangle(bev);
|
||||||
|
|
||||||
AColor::Bevel2(*dc, !down, bev, selected);
|
AColor::Bevel2(*dc, !down, bev, selected, hit);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_THEMING
|
#ifdef EXPERIMENTAL_THEMING
|
||||||
wxColour c = theTheme.Colour(clrTrackPanelText);
|
wxColour c = theTheme.Colour(clrTrackPanelText);
|
||||||
@@ -2123,7 +2123,7 @@ void TrackInfo::VelocitySliderDrawFunction
|
|||||||
|
|
||||||
void TrackInfo::MuteOrSoloDrawFunction
|
void TrackInfo::MuteOrSoloDrawFunction
|
||||||
( wxDC *dc, const wxRect &bev, const Track *pTrack, bool down, bool captured,
|
( wxDC *dc, const wxRect &bev, const Track *pTrack, bool down, bool captured,
|
||||||
bool solo )
|
bool solo, bool hit )
|
||||||
{
|
{
|
||||||
//bev.Inflate(-1, -1);
|
//bev.Inflate(-1, -1);
|
||||||
bool selected = pTrack ? pTrack->GetSelected() : true;
|
bool selected = pTrack ? pTrack->GetSelected() : true;
|
||||||
@@ -2163,7 +2163,7 @@ void TrackInfo::MuteOrSoloDrawFunction
|
|||||||
*dc,
|
*dc,
|
||||||
value == down,
|
value == down,
|
||||||
bev,
|
bev,
|
||||||
selected
|
selected, hit
|
||||||
);
|
);
|
||||||
|
|
||||||
SetTrackInfoFont(dc);
|
SetTrackInfoFont(dc);
|
||||||
@@ -2183,7 +2183,7 @@ void TrackInfo::WideMuteDrawFunction
|
|||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
||||||
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, false );
|
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, false, hit );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::WideSoloDrawFunction
|
void TrackInfo::WideSoloDrawFunction
|
||||||
@@ -2197,7 +2197,7 @@ void TrackInfo::WideSoloDrawFunction
|
|||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
||||||
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, true );
|
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, true, hit );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::MuteAndSoloDrawFunction
|
void TrackInfo::MuteAndSoloDrawFunction
|
||||||
@@ -2217,7 +2217,7 @@ void TrackInfo::MuteAndSoloDrawFunction
|
|||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
||||||
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, false );
|
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, false, hit );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !bHasSoloButton )
|
if( !bHasSoloButton )
|
||||||
@@ -2229,7 +2229,7 @@ void TrackInfo::MuteAndSoloDrawFunction
|
|||||||
bool hit = target && target->GetTrack().get() == pTrack;
|
bool hit = target && target->GetTrack().get() == pTrack;
|
||||||
bool captured = hit && target->IsClicked();
|
bool captured = hit && target->IsClicked();
|
||||||
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
bool down = captured && bev.Contains( context.lastState.GetPosition());
|
||||||
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, true );
|
MuteOrSoloDrawFunction( dc, bev, pTrack, down, captured, true, hit );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public:
|
|||||||
|
|
||||||
static void MuteOrSoloDrawFunction
|
static void MuteOrSoloDrawFunction
|
||||||
( wxDC *dc, const wxRect &rect, const Track *pTrack, bool down,
|
( wxDC *dc, const wxRect &rect, const Track *pTrack, bool down,
|
||||||
bool captured, bool solo );
|
bool captured, bool solo, bool hit );
|
||||||
|
|
||||||
static void WideMuteDrawFunction
|
static void WideMuteDrawFunction
|
||||||
( TrackPanelDrawingContext &context,
|
( TrackPanelDrawingContext &context,
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ ButtonHandle::ButtonHandle
|
|||||||
( const std::shared_ptr<Track> &pTrack, const wxRect &rect )
|
( const std::shared_ptr<Track> &pTrack, const wxRect &rect )
|
||||||
: mpTrack{ pTrack }
|
: mpTrack{ pTrack }
|
||||||
, mRect{ rect }
|
, mRect{ rect }
|
||||||
{}
|
{
|
||||||
|
mChangeHighlight = RefreshCode::RefreshCell;
|
||||||
|
}
|
||||||
|
|
||||||
ButtonHandle::~ButtonHandle()
|
ButtonHandle::~ButtonHandle()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user