mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 23:02:42 +02:00
Removing remaining code for focusable time ruler
This commit is contained in:
parent
bbd369df1b
commit
a0bb210dbe
@ -200,9 +200,4 @@
|
||||
// interpolating in frequency domain.
|
||||
#define EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||
|
||||
// Paul Licameli (PRL) 10 May 2016
|
||||
// Time ruler accepts focus, buttons can be reached with TAB
|
||||
//#define EXPERIMENTAL_TIME_RULER_NAVIGATION
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2795,17 +2795,10 @@ void AudacityProject::NextOrPrevFrame(bool forward)
|
||||
|
||||
|
||||
// Define the set of windows we rotate among.
|
||||
static const unsigned rotationSize = 3u
|
||||
#ifdef EXPERIMENTAL_TIME_RULER_NAVIGATION
|
||||
+ 1
|
||||
#endif
|
||||
;
|
||||
static const unsigned rotationSize = 3u;
|
||||
|
||||
wxWindow *const begin [rotationSize] = {
|
||||
GetTopPanel(),
|
||||
#ifdef EXPERIMENTAL_TIME_RULER_NAVIGATION
|
||||
GetRulerPanel(),
|
||||
#endif
|
||||
GetTrackPanel(),
|
||||
mToolManager->GetBotDock(),
|
||||
};
|
||||
|
@ -1670,11 +1670,6 @@ enum : int {
|
||||
BottomMargin = 2, // for bottom bevel and bottom line
|
||||
LeftMargin = 1,
|
||||
|
||||
FocusBorder = 2,
|
||||
FocusBorderLeft = FocusBorder,
|
||||
FocusBorderTop = FocusBorder,
|
||||
FocusBorderBottom = FocusBorder + 1, // count 1 for the black stroke
|
||||
|
||||
RightMargin = 1,
|
||||
};
|
||||
|
||||
@ -2080,7 +2075,7 @@ void AdornedRulerPanel::ReCreateButtons()
|
||||
|
||||
// Make the short row of time ruler pushbottons.
|
||||
// Don't bother with sizers. Their sizes and positions are fixed.
|
||||
wxPoint position{ FocusBorderLeft, 0 };
|
||||
wxPoint position{ 1 + LeftMargin, 0 };
|
||||
size_t iButton = 0;
|
||||
auto size = theTheme.ImageSize( bmpRecoloredUpSmall );
|
||||
size.y = std::min(size.y, GetRulerHeight(false));
|
||||
@ -3072,26 +3067,10 @@ void AdornedRulerPanel::DoDrawBackground(wxDC * dc)
|
||||
|
||||
void AdornedRulerPanel::DoDrawEdge(wxDC *dc)
|
||||
{
|
||||
if (HasFocus()) {
|
||||
dc->SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
wxRect rect{ mOuter };
|
||||
--rect.height; // Leave room for the black stroke
|
||||
|
||||
AColor::TrackFocusPen(dc, 1);
|
||||
dc->DrawRectangle(rect);
|
||||
|
||||
AColor::TrackFocusPen(dc, 0);
|
||||
rect.Deflate(1, 1);
|
||||
dc->DrawRectangle(rect);
|
||||
|
||||
static_assert(FocusBorder == 2, "Draws the wrong number of rectangles");
|
||||
}
|
||||
else {
|
||||
wxRect r = mOuter;
|
||||
r.width -= RightMargin;
|
||||
r.height -= BottomMargin;
|
||||
AColor::BevelTrackInfo( *dc, true, r );
|
||||
}
|
||||
wxRect r = mOuter;
|
||||
r.width -= RightMargin;
|
||||
r.height -= BottomMargin;
|
||||
AColor::BevelTrackInfo( *dc, true, r );
|
||||
|
||||
// Black stroke at bottom
|
||||
dc->SetPen( *wxBLACK_PEN );
|
||||
@ -3099,8 +3078,6 @@ void AdornedRulerPanel::DoDrawEdge(wxDC *dc)
|
||||
mOuter.y + mOuter.height - 1,
|
||||
mOuter.x + mOuter.width,
|
||||
mOuter.y + mOuter.height - 1 );
|
||||
|
||||
static_assert(FocusBorderBottom == 1 + FocusBorder, "Button area might be wrong");
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::DoDrawMarks(wxDC * dc, bool /*text */ )
|
||||
|
@ -294,9 +294,8 @@ public:
|
||||
|
||||
~AdornedRulerPanel();
|
||||
|
||||
#ifndef EXPERIMENTAL_TIME_RULER_NAVIGATION
|
||||
bool AcceptsFocus() const override { return false; }
|
||||
#endif
|
||||
bool AcceptsFocusFromKeyboard() const override { return false; }
|
||||
|
||||
public:
|
||||
int GetRulerHeight() { return GetRulerHeight(mShowScrubbing); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user