change appearance of panner data popup slightly (fixed width font so it doesn't bounc...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 7 Feb 2011 17:28:37 +0000 (17:28 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 7 Feb 2011 17:28:37 +0000 (17:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8746 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour3_ui_dark.rc.in
gtk2_ardour/mono_panner.cc
gtk2_ardour/stereo_panner.cc

index bb280ae98af2979a44f46395e3b26d0f9009465e..9c3ee9744c420f3fe368fda23155cd0ce5eb3eb9 100644 (file)
@@ -84,12 +84,12 @@ style "medium_bold_text"
 
 style "medium_text"
 {
-       font_name = "@FONT_NORMAL"
+       font_name = "@FONT_NORMAL@"
 }
 
 style "medium_monospace_text"
 {
-       #font_name = "monospace @FONT_NORMAL@"
+        font_name = "monospace @FONT_NORMAL@"
 }
 
 style "red_medium_text" = "medium_text"
@@ -292,7 +292,7 @@ style "default" = "medium_text"
   }
 }
 
-style "contrasting_popup" = "medium_text"
+style "contrasting_popup" = "medium_monospace_text"
 {
   bg[NORMAL]          = @A_lightest
   fg[NORMAL]          = @A_darkest
index 9627f871062308802aaea9b80e0c3c3ddc63e8da..5500d6f555f4f00ebbb337f83f838a2f466d82f6 100644 (file)
@@ -105,9 +105,11 @@ MonoPanner::set_drag_data ()
            the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense.
         */
 
-        drag_data_label->set_markup (string_compose (_("L:%1 R:%2"),
-                                                     (int) rint (100.0 * (1.0 - pos)),
-                                                     (int) rint (100.0 * pos)));
+        char buf[64];
+        snprintf (buf, sizeof (buf), "L:%3d R:%3d",
+                  (int) rint (100.0 * (1.0 - pos)),
+                  (int) rint (100.0 * pos));
+        drag_data_label->set_markup (buf);
 }
 
 void
index 4889f023435e5978690a569877be7322edecf871..53f143d2d925119296704a87a0ed355fd6c5a832 100644 (file)
@@ -114,10 +114,11 @@ StereoPanner::set_drag_data ()
            the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense.
         */
 
-        drag_data_label->set_markup (string_compose (_("L:%1 R:%2 Width: %3%%"),
-                                                     (int) rint (100.0 * (1.0 - pos)),
-                                                     (int) rint (100.0 * pos),
-                                                     (int) floor (100.0 * width_control->get_value())));
+        char buf[64];
+        snprintf (buf, sizeof (buf), "L:%3d R:%3d Width:%d%%", (int) rint (100.0 * (1.0 - pos)),
+                  (int) rint (100.0 * pos),
+                  (int) floor (100.0 * width_control->get_value()));
+        drag_data_label->set_markup (buf);
 }
 
 void
@@ -312,7 +313,7 @@ StereoPanner::on_button_press_event (GdkEventButton* ev)
                         
                         /* upper section: adjusts position, constrained by width */
 
-                        const double w = width_control->get_value ();
+                        const double w = fabs (width_control->get_value ());
                         const double max_pos = 1.0 - (w/2.0);
                         const double min_pos = w/2.0;