From 8bda12596ababc867c5c82dfffc432eec5771ea8 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 30 Sep 2011 20:41:10 +0000 Subject: [PATCH] Increase the minimum width of the thumb in the audio display scrollbar Originally committed to SVN as r5689. --- aegisub/src/audio_display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index e5912a68f..a589d3d65 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -64,6 +64,7 @@ class AudioDisplayScrollbar : public AudioDisplayInteractionObject { static const int height = 10; + static const int min_width = 10; wxRect bounds; wxRect thumb; @@ -82,7 +83,7 @@ class AudioDisplayScrollbar : public AudioDisplayInteractionObject { // Recalculate thumb bounds from position and length data 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.x = bounds.width * position / data_length; thumb.y = bounds.y;