mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Move some constants and GetVRulerOffset() out of TrackPanel.h
This commit is contained in:
@@ -216,38 +216,6 @@ namespace TrackInfo
|
||||
|
||||
const int DragThreshold = 3;// Anything over 3 pixels is a drag, else a click.
|
||||
|
||||
|
||||
// See big pictorial comment in TrackPanel for explanation of these numbers
|
||||
enum : int {
|
||||
kLeftInset = 4,
|
||||
kRightInset = kLeftInset,
|
||||
kTopInset = 4,
|
||||
kShadowThickness = 1,
|
||||
kBorderThickness = 1,
|
||||
kTopMargin = kTopInset + kBorderThickness,
|
||||
kBottomMargin = kShadowThickness + kBorderThickness,
|
||||
kLeftMargin = kLeftInset + kBorderThickness,
|
||||
kRightMargin = kRightInset + kShadowThickness + kBorderThickness,
|
||||
kSeparatorThickness = kBottomMargin + kTopMargin,
|
||||
};
|
||||
|
||||
enum : int {
|
||||
kTrackInfoWidth = 100 - kLeftMargin,
|
||||
kTrackInfoBtnSize = 18, // widely used dimension, usually height
|
||||
kTrackInfoSliderHeight = 25,
|
||||
kTrackInfoSliderWidth = 84,
|
||||
kTrackInfoSliderAllowance = 5,
|
||||
kTrackInfoSliderExtra = 5,
|
||||
};
|
||||
|
||||
#ifdef USE_MIDI
|
||||
enum : int {
|
||||
// PRL: was it correct to include the margin?
|
||||
kMidiCellWidth = ( ( kTrackInfoWidth + kLeftMargin ) / 4) - 2,
|
||||
kMidiCellHeight = kTrackInfoBtnSize
|
||||
};
|
||||
#endif
|
||||
|
||||
class AUDACITY_DLL_API TrackPanel final
|
||||
: public CellularPanel
|
||||
, public NonKeystrokeInterceptingWindow
|
||||
@@ -361,11 +329,9 @@ protected:
|
||||
std::shared_ptr<TrackPanelNode> Root() override;
|
||||
|
||||
int GetVRulerWidth() const;
|
||||
int GetVRulerOffset() const { return kTrackInfoWidth + kLeftMargin; }
|
||||
|
||||
public:
|
||||
int GetLabelWidth() const
|
||||
{ return GetVRulerOffset() + GetVRulerWidth(); }
|
||||
int GetLabelWidth() const;
|
||||
|
||||
// JKC Nov-2011: These four functions only used from within a dll such as mod-track-panel
|
||||
// They work around some messy problems with constructors.
|
||||
|
||||
Reference in New Issue
Block a user