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