more transport button caironizing.
[ardour.git] / gtk2_ardour / mono_panner.cc
index 7f1c98a0cbc251c913b9d7aa99679ec2cf946f73..ce8b55eacf689b66a4a48d765d6cdced61964cb9 100644 (file)
@@ -50,6 +50,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
 
 static const int pos_box_size = 9;
 static const int lr_box_size = 15;
@@ -80,9 +81,7 @@ MonoPanner::MonoPanner (boost::shared_ptr<ARDOUR::PannerShell> p)
        if (!have_font) {
                Pango::FontDescription font;
                Pango::AttrFontDesc* font_attr;
-               font = Pango::FontDescription ("ArdourMono");
-               font.set_weight (Pango::WEIGHT_BOLD);
-               font.set_size(9 * PANGO_SCALE);
+               font = Pango::FontDescription (ARDOUR_UI::config()->get_SmallBoldMonospaceFont());
                font_attr = new Pango::AttrFontDesc (Pango::Attribute::create_attr_font_desc (font));
                panner_font_attributes.change(*font_attr);
                delete font_attr;
@@ -159,8 +158,7 @@ MonoPanner::on_expose_event (GdkEventExpose*)
        }
 
        if (_send_mode) {
-               b = rgba_from_style("SendStripBase",
-                               UINT_RGBA_R(b), UINT_RGBA_G(b), UINT_RGBA_B(b), 255, "fg");
+               b = ARDOUR_UI::config()->color ("send bg");
        }
        /* background */
        context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
@@ -202,7 +200,7 @@ MonoPanner::on_expose_event (GdkEventExpose*)
        Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create(get_pango_context());
        layout->set_attributes (panner_font_attributes);
 
-       layout->set_text (_("L"));
+       layout->set_text (S_("Panner|L"));
        layout->get_pixel_size(tw, th);
        context->move_to (rint(left - tw/2), rint(lr_box_size + step_down - th/2));
        context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
@@ -219,7 +217,7 @@ MonoPanner::on_expose_event (GdkEventExpose*)
        context->stroke();
 
        /* add text */
-       layout->set_text (_("R"));
+       layout->set_text (S_("Panner|R"));
        layout->get_pixel_size(tw, th);
        context->move_to (rint(right - tw/2), rint(lr_box_size + step_down - th/2));
        context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
@@ -489,12 +487,12 @@ MonoPanner::on_key_press_event (GdkEventKey* ev)
 void
 MonoPanner::set_colors ()
 {
-        colors.fill = ARDOUR_UI::config()->get_canvasvar_MonoPannerFill();
-        colors.outline = ARDOUR_UI::config()->get_canvasvar_MonoPannerOutline();
-        colors.text = ARDOUR_UI::config()->get_canvasvar_MonoPannerText();
-        colors.background = ARDOUR_UI::config()->get_canvasvar_MonoPannerBackground();
-        colors.pos_outline = ARDOUR_UI::config()->get_canvasvar_MonoPannerPositionOutline();
-        colors.pos_fill = ARDOUR_UI::config()->get_canvasvar_MonoPannerPositionFill();
+        colors.fill = ARDOUR_UI::config()->color_mod ("mono panner fill", "panner fill");
+        colors.outline = ARDOUR_UI::config()->color ("mono panner outline");
+        colors.text = ARDOUR_UI::config()->color ("mono panner text");
+        colors.background = ARDOUR_UI::config()->color ("mono panner bg");
+        colors.pos_outline = ARDOUR_UI::config()->color ("mono panner position outline");
+        colors.pos_fill = ARDOUR_UI::config()->color_mod ("mono panner position fill", "mono panner position fill");
 }
 
 void