Increase the minimum width of the thumb in the audio display scrollbar
Originally committed to SVN as r5689.
This commit is contained in:
parent
8f918a59c2
commit
8bda12596a
|
@ -64,6 +64,7 @@
|
||||||
|
|
||||||
class AudioDisplayScrollbar : public AudioDisplayInteractionObject {
|
class AudioDisplayScrollbar : public AudioDisplayInteractionObject {
|
||||||
static const int height = 10;
|
static const int height = 10;
|
||||||
|
static const int min_width = 10;
|
||||||
|
|
||||||
wxRect bounds;
|
wxRect bounds;
|
||||||
wxRect thumb;
|
wxRect thumb;
|
||||||
|
@ -82,7 +83,7 @@ class AudioDisplayScrollbar : public AudioDisplayInteractionObject {
|
||||||
// Recalculate thumb bounds from position and length data
|
// Recalculate thumb bounds from position and length data
|
||||||
void RecalculateThumb()
|
void RecalculateThumb()
|
||||||
{
|
{
|
||||||
thumb.width = std::max((height+1)/2, bounds.width * page_length / data_length);
|
thumb.width = std::max(min_width, bounds.width * page_length / data_length);
|
||||||
thumb.height = height;
|
thumb.height = height;
|
||||||
thumb.x = bounds.width * position / data_length;
|
thumb.x = bounds.width * position / data_length;
|
||||||
thumb.y = bounds.y;
|
thumb.y = bounds.y;
|
||||||
|
|
Loading…
Reference in a new issue