mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
TrackInfo doesn't use the kTopMargin or kBottomMargin constants...
... It only needs their sum, which it will assume is the constant amount of padding always between tracks (not channels of a track). (cherry picked from audacity commit 058c729ea544e326938b9473e7b9a5cd5ecc6ab5) Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
parent
88fe1ee084
commit
ce2bc7f60e
@ -202,7 +202,7 @@ unsigned TrackInfo::MinimumTrackHeight()
|
||||
height += commonTrackTCPBottomLines.front().height;
|
||||
// + 1 prevents the top item from disappearing for want of enough space,
|
||||
// according to the rules in HideTopItem.
|
||||
return height + kTopMargin + kBottomMargin + 1;
|
||||
return height + kVerticalPadding + 1;
|
||||
}
|
||||
|
||||
bool TrackInfo::HideTopItem( const wxRect &rect, const wxRect &subRect,
|
||||
@ -566,7 +566,7 @@ void TrackInfo::SetTrackInfoFont(wxDC * dc)
|
||||
unsigned TrackInfo::DefaultTrackHeight( const TCPLines &topLines )
|
||||
{
|
||||
int needed =
|
||||
kTopMargin + kBottomMargin +
|
||||
kVerticalPadding +
|
||||
totalTCPLines( topLines, true ) +
|
||||
totalTCPLines( commonTrackTCPBottomLines, false ) + 1;
|
||||
return (unsigned) std::max( needed, (int) TrackView::DefaultHeight );
|
||||
|
@ -99,8 +99,9 @@ private:
|
||||
};
|
||||
|
||||
// See big pictorial comment in TrackPanel.cpp for explanation of these numbers
|
||||
//! constants related to y coordinates in the track panel
|
||||
enum : int {
|
||||
// constants related to y coordinates in the track panel
|
||||
kVerticalPadding = 7, /*!< Width of padding below each channel group */
|
||||
kAffordancesAreaHeight = 20,
|
||||
kTopInset = 4,
|
||||
kTopMargin = kTopInset + kBorderThickness,
|
||||
@ -108,6 +109,8 @@ enum : int {
|
||||
kSeparatorThickness = kBottomMargin + kTopMargin,
|
||||
};
|
||||
|
||||
static_assert( kVerticalPadding == kTopMargin + kBottomMargin );
|
||||
|
||||
enum : int {
|
||||
kTrackInfoBtnSize = 18, // widely used dimension, usually height
|
||||
kTrackInfoSliderHeight = 25,
|
||||
|
Loading…
x
Reference in New Issue
Block a user