mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-02 17:23:18 +02:00
Paint over region between Grabber and Pin button.
Numbers from the timeline were previously visible here.
This commit is contained in:
parent
555767f2ad
commit
2a113f7ae4
@ -94,6 +94,17 @@ void Grabber::SendEvent(wxEventType type, const wxPoint & pos, bool escaping)
|
||||
parent->GetEventHandler()->AddPendingEvent(e);
|
||||
}
|
||||
|
||||
void Grabber::SetAsSpacer( bool bIsSpacer ) {
|
||||
if( mAsSpacer != bIsSpacer ){
|
||||
// HACK: Use a wider rectangle to also cover one pixel of space just to the right.
|
||||
wxSize siz = GetSize();
|
||||
siz.IncBy( bIsSpacer ? 1:-1, 0 );
|
||||
SetSize( siz );
|
||||
}
|
||||
mAsSpacer = bIsSpacer;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Draw the grabber
|
||||
//
|
||||
@ -107,8 +118,14 @@ void Grabber::DrawGrabber( wxDC & dc )
|
||||
int y, left, right, top, bottom;
|
||||
|
||||
#ifndef EXPERIMENTAL_THEMING
|
||||
|
||||
AColor::Medium(&dc, mOver );
|
||||
dc.DrawRectangle(r);
|
||||
|
||||
// HACK: We used a wider rectangle to also cover one pixel of space just to the right.
|
||||
if( mAsSpacer )
|
||||
r.width -= 1;
|
||||
|
||||
#else
|
||||
// Paint the background
|
||||
if( mOver )
|
||||
@ -126,6 +143,7 @@ void Grabber::DrawGrabber( wxDC & dc )
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __WXMAC__
|
||||
|
||||
// Add a box
|
||||
|
@ -111,7 +111,7 @@ class Grabber final : public wxWindow
|
||||
bool AcceptsFocusFromKeyboard() const override {return false;}
|
||||
|
||||
void PushButton(bool state);
|
||||
void SetAsSpacer( bool bIsSpacer ) { mAsSpacer = bIsSpacer;};
|
||||
void SetAsSpacer( bool bIsSpacer );
|
||||
|
||||
protected:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user