Tweak group label formatting in AudioMappingView.
authorCarl Hetherington <cth@carlh.net>
Wed, 1 Jun 2016 13:18:56 +0000 (14:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 Jun 2016 13:18:56 +0000 (14:18 +0100)
src/wx/audio_mapping_view.cc

index 46560e094258f92b15bc3cedd08fe034262081b9..d984defee646cf7e00243918e4aa55067575e0da 100644 (file)
@@ -386,7 +386,13 @@ AudioMappingView::paint_left_labels ()
                        wxCoord label_height;
                        dc.GetTextExtent (std_to_wx (i.name), &label_width, &label_height);
 
-                       dc.DrawRotatedText (i.name, half + (half - label_height) / 2, (ypos + old_ypos + label_width) / 2, 90);
+                       dc.DrawRotatedText (
+                               i.name,
+                               half + (half - label_height) / 2,
+                               min (ypos, (ypos + old_ypos + label_width) / 2),
+                               90
+                               );
+
                        dc.DestroyClippingRegion ();
 
                        lines.MoveToPoint (half, ypos);