tweaked panner appearance and consistency, panner line now distinct color from triang...
authorJesse Chappell <jesse@essej.net>
Sat, 30 Dec 2006 06:37:00 +0000 (06:37 +0000)
committerJesse Chappell <jesse@essej.net>
Sat, 30 Dec 2006 06:37:00 +0000 (06:37 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1253 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour.bindings
gtk2_ardour/ardour2_ui.rc
gtk2_ardour/audio_region_view.cc
gtk2_ardour/panner.cc
gtk2_ardour/panner_ui.cc
libs/gtkmm2ext/barcontroller.cc
tools/osx_packaging/app_build.rb
tools/osx_packaging/ardour2_mac_ui.rc

index bf5df40e9ec439430f0a9f5cf3a08d4d51a7d5b9..86f50e139f7b6d5c7c37cddca8b1cf4314efda35 100644 (file)
 ; (gtk_accel_path "<Actions>/Editor/EditSelectRegionOptions" "")
 (gtk_accel_path "<Actions>/Editor/crop" "c")
 ; (gtk_accel_path "<Actions>/redirectmenu/newsend" "")
-; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurfaceSubMenu" "")
 ; (gtk_accel_path "<Actions>/Editor/MeterFalloff" "")
 ; (gtk_accel_path "<Actions>/RegionList/rlRemove" "")
 (gtk_accel_path "<Actions>/Transport/GotoStart" "Home")
 ; (gtk_accel_path "<Actions>/Editor/Subframes80" "")
 ; (gtk_accel_path "<Actions>/options/FileHeaderFormatCAF" "")
 (gtk_accel_path "<Actions>/Common/ToggleLocations" "<Alt>l")
-; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurface" "")
 (gtk_accel_path "<Actions>/Editor/editor-delete" "Delete")
 ; (gtk_accel_path "<Actions>/JACK/JACKLatency256" "")
 (gtk_accel_path "<Actions>/Editor/select-all-between-cursors" "u")
 ; (gtk_accel_path "<Actions>/Snap/snap-to-region-sync" "")
 (gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-sync" "apostrophe")
 ; (gtk_accel_path "<Actions>/redirectmenu/clear" "")
-; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurfaceFeedback" "")
 ; (gtk_accel_path "<Actions>/Editor/PullupPlus4Minus1" "")
 ; (gtk_accel_path "<Actions>/JACK/JACKLatency512" "")
 (gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-end" "<Control>bracketright")
index 771210829d38b0361b8d0d8a5e19f1620eeec2f6..8ce91c4d390e7937dadaa53be00ce19cf73bda0d 100644 (file)
@@ -951,13 +951,13 @@ style "pan_slider"
 {
        font_name = "sans 8"
 
-       fg[NORMAL] = { 0.67, 0.23, 0.22 }
-       fg[ACTIVE] = { 0.67, 0.23, 0.22 }
+       fg[NORMAL] = { 0.22, 0.73, 0.22 }
+       fg[ACTIVE] = { 0.22, 0.73, 0.22 }
        fg[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
        fg[SELECTED] = { 0.67, 0.23, 0.22 }
        fg[PRELIGHT] = { 0.67, 0.23, 0.22 }
 
-       bg[NORMAL] = { 0, 0, 0 }
+       bg[NORMAL] = { 0.05, 0.05, 0.05 }
        bg[ACTIVE] = { 0, 0, 0 }
        bg[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
        bg[SELECTED] = { 0, 0, 0 }
index c71abe8676aa361c7bc0c974b096be7ded4a31d4..a40e4979827556755a4d35fc17125b6c6ba23642 100644 (file)
@@ -716,6 +716,7 @@ AudioRegionView::show_region_editor ()
        } 
 
        editor->present ();
+       editor->show_all();
 }
 
 void
index a447b69935d6bb858f3e351c2a7cc83b84fb3038..bb9b43218426bfe33219f85527cb98bc6cac99ca 100644 (file)
@@ -4,7 +4,7 @@
 
 using namespace std;
 
-static const int triangle_size = 7;
+static const int triangle_size = 5;
 
 static void
 null_label_callback (char* buf, unsigned int bufsize)
@@ -65,13 +65,13 @@ PannerBar::expose (GdkEventExpose* ev)
 
        // right
 
-       points[0].x = (darea.get_width() - triangle_size);
+       points[0].x = (darea.get_width() - triangle_size) - 1;
        points[0].y = 0;
 
-       points[1].x = darea.get_width();
+       points[1].x = darea.get_width() - 1;
        points[1].y = 0;
        
-       points[2].x = darea.get_width();
+       points[2].x = darea.get_width() - 1;
        points[2].y = triangle_size;
 
        gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
index 46d69b7a798ecbc4ecbdadefa5436d6ae53abd9e..72cd24bccee86f3184692100c5fb907e999ccb9d 100644 (file)
@@ -73,7 +73,7 @@ PannerUI::PannerUI (boost::shared_ptr<IO> io, Session& s)
        //set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2);
 
        pan_bar_packer.set_size_request (-1, 61);
-       panning_viewport.set_size_request (61, 61);
+       panning_viewport.set_size_request (64, 61);
 
        panning_viewport.set_name (X_("BaseFrame"));
 
@@ -133,7 +133,7 @@ PannerUI::PannerUI (boost::shared_ptr<IO> io, Session& s)
        panning_up_arrow.set_name (X_("PanScrollerArrow"));
        panning_down_arrow.set_name (X_("PanScrollerArrow"));
 
-       pan_vbox.set_spacing (4);
+       pan_vbox.set_spacing (2);
        pan_vbox.pack_start (panning_viewport, Gtk::PACK_SHRINK);
        pan_vbox.pack_start (panning_link_box, Gtk::PACK_SHRINK);
 
@@ -215,22 +215,22 @@ PannerUI::set_width (Width w)
 {
        switch (w) {
        case Wide:
-               panning_viewport.set_size_request (61, 61);
+               panning_viewport.set_size_request (64, 61);
                if (panner) {
-                       panner->set_size_request (61, 61);
+                       panner->set_size_request (63, 61);
                }
                for (vector<PannerBar*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
-                       (*i)->set_size_request (61, pan_bar_height);
+                       (*i)->set_size_request (63, pan_bar_height);
                }
                panning_link_button.set_label (_("link"));
                break;
        case Narrow:
-               panning_viewport.set_size_request (31, 61);
+               panning_viewport.set_size_request (34, 61);
                if (panner) {
-                       panner->set_size_request (31, 61);
+                       panner->set_size_request (33, 61);
                }
                for (vector<PannerBar*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
-                               (*i)->set_size_request (31, pan_bar_height);
+                       (*i)->set_size_request (33, pan_bar_height);
                }
                panning_link_button.set_label (_("L"));
                break;
@@ -303,19 +303,33 @@ PannerUI::setup_pan ()
 
                while ((asz = pan_adjustments.size()) < npans) {
 
-                       float x;
+                       float x, rx;
                        PannerBar* bc;
 
-                       /* initialize adjustment with current value of panner */
+                       /* initialize adjustment with 0.0 (L) or 1.0 (R) for the first and second panners,
+                          which serves as a default, otherwise use current value */
 
-                       _io->panner()[asz]->get_position (x);
+                       _io->panner()[asz]->get_position (rx);
+
+                       if (npans == 1) {
+                               x = 0.5;
+                       } else if (asz == 0) {
+                               x = 0.0;
+                       } else if (asz == 1) {
+                               x = 1.0;
+                       } else {
+                               x = rx;
+                       }
 
                        pan_adjustments.push_back (new Adjustment (x, 0, 1.0, 0.05, 0.1));
+                       bc = new PannerBar (*pan_adjustments[asz], _io->panner()[asz]->control());
+
+                       /* now set adjustment with current value of panner, then connect the signals */
+                       pan_adjustments.back()->set_value(rx);
                        pan_adjustments.back()->signal_value_changed().connect (bind (mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
 
                        _io->panner()[asz]->Changed.connect (bind (mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz));
 
-                       bc = new PannerBar (*pan_adjustments[asz], _io->panner()[asz]->control());
                        
                        bc->set_name ("PanSlider");
                        bc->set_shadow_type (Gtk::SHADOW_NONE);
@@ -333,10 +347,10 @@ PannerUI::setup_pan ()
                        pan_bars.push_back (bc);
                        switch (_width) {
                        case Wide:
-                               bc->set_size_request (61, pan_bar_height);
+                               bc->set_size_request (63, pan_bar_height);
                                break;
                        case Narrow:
-                               bc->set_size_request (31, pan_bar_height);
+                               bc->set_size_request (33, pan_bar_height);
                                break;
                        }
 
@@ -360,10 +374,10 @@ PannerUI::setup_pan ()
 
                switch (_width) {
                case Wide:
-                       w = 61;
+                       w = 63;
                        break;
                case Narrow:
-                       w = 31;
+                       w = 33;
                        break;
                }
 
index 5dff70cedfd962cf588af211221d0ef65d49c491..f59d192ff1402a78575d74a060f8a64128277699 100644 (file)
@@ -229,7 +229,7 @@ BarController::motion (GdkEventMotion* ev)
 gint
 BarController::mouse_control (double x, GdkWindow* window, double scaling)
 {
-       double fract;
+       double fract = 0.0;
        double delta;
 
        if (window != grab_window) {
@@ -263,7 +263,7 @@ BarController::expose (GdkEventExpose* event)
 {
        Glib::RefPtr<Gdk::Window> win (darea.get_window());
        Widget* parent;
-       gint x1, x2, y1, y2;
+       gint x1=0, x2=0, y1=0, y2=0;
        gint w, h;
        double fract;
 
@@ -275,6 +275,7 @@ BarController::expose (GdkEventExpose* event)
        
        switch (_style) {
        case Line:
+               h = darea.get_height();
                x1 = (gint) floor (w * fract);
                x2 = x1;
                y1 = 0;
@@ -293,10 +294,10 @@ BarController::expose (GdkEventExpose* event)
 
                        win->draw_rectangle (get_style()->get_bg_gc (get_state()),
                                             true,
-                                            0, 0, darea.get_width(), darea.get_height());
+                                            0, 0, darea.get_width() - ((darea.get_width()+1) % 2), darea.get_height());
                }
                
-               win->draw_line (get_style()->get_base_gc (get_state()), x1, 0, x1, darea.get_height());
+               win->draw_line (get_style()->get_fg_gc (get_state()), x1, 0, x1, h);
                break;
 
        case CenterOut:
index c81225024b52757c90e83133f28061856af30d1a..4cab63503497e6b4c65896cabc378d69b20d345b 100755 (executable)
@@ -102,14 +102,16 @@ end
 Dir.chdir(odir)
 
 # copy ardour.bin to bindir/ardour
-$stdout.print("Copying bin to #{bindir} ...\n");
+
 
 if File.exist?("../../gtk2_ardour/ardour.bin") then
+   $stdout.print("Copying bin to #{bindir} ...\n");
    `cp ../../gtk2_ardour/ardour.bin #{bindir}/ardour`
 end
 
 `cp ../../libs/surfaces/*/*.dylib #{libdir}/surfaces`
 # remove the basenames from libdir that are in surfaces (copied earlier)
+`rm -f #{libdir}/surfaces/libardour_cp.dylib`
 begin
   Dir.foreach(libdir+"/surfaces") {|x| unless ( x[0] == 46 or x.include?("libardour_cp")) then File.delete(libdir + "/" +x) end}
 rescue
@@ -174,6 +176,7 @@ end
 if File.exist?(ppc_libdir) and File.exist?(i386_libdir) then
   $stdout.print("\nBoth platforms in place, lipo'ing...\n");
   `rm -rf lib/*`
+  `rm -f bin/ardour`
   lipo_platforms_recurse(ppc_libdir, i386_libdir, "lib")
   lipo_platforms_recurse(i386_libdir, ppc_libdir, "lib")
   lipo_platforms_recurse(i386_bindir+'/ardour', ppc_bindir+'/ardour', "bin/ardour")
index 775a1247bfa5d07b8e4a0291fc9f05ff760e31c8..c4d5e776eff1114281581086c28cdf125a46e1ef 100644 (file)
@@ -58,6 +58,11 @@ style "plugin_maker_text"
        fg[NORMAL] = { 0.80, 0.80, 0.80 }
 }
 
+style "automation_track_name"
+{
+       font_name = "sans italic 8"
+}
+
 style "first_action_message" 
 {
        font_name = "sans medium 34"
@@ -846,16 +851,16 @@ style "flashing_alert" = "very_small_text"
 style "selected_io_selector_port_list" = "medium_bold_text"
 {
 
-       GtkTreeView::even-row-color = { 0.64, 0.68, 0.54 }
-       GtkTreeView::odd-row-color = { 0.64, 0.68, 0.54 }
+       GtkTreeView::even-row-color = { 0, 0, 0 }
+       GtkTreeView::odd-row-color = { 0, 0, 0 }
 
 # fg is used to color the fg (text) of the column header button
 
-       fg[NORMAL] = { 0.80, 0.80, 0.70 }
-       fg[SELECTED] = { 0.80, 0.80, 0.70 }
-       fg[ACTIVE] = { 0.80, 0.80, 0.70 }
-       fg[PRELIGHT] = { 0.80, 0.80, 0.70 }
-       fg[INSENSITIVE] = { 0.80, 0.80, 0.70 }
+       fg[NORMAL] = { 0.85, 0.85, 0.85 }
+       fg[SELECTED] = { 0.85, 0.85, 0.85 }
+       fg[ACTIVE] = { 0.85, 0.85, 0.85 }
+       fg[PRELIGHT] = { 0.85, 0.85, 0.85 }
+       fg[INSENSITIVE] = { 0.85, 0.85, 0.85 }
 
 # bg is used used to color the background of the column header button
 
@@ -867,29 +872,30 @@ style "selected_io_selector_port_list" = "medium_bold_text"
 
 # text is used to color the treeview row text
 
-       text[NORMAL] = { 0.80, 0.80, 0.70 }
-       text[SELECTED] = { 0.80, 0.80, 0.70 }
+       text[NORMAL] = { 0.85, 0.85, 0.85 }
+       text[SELECTED] = { 0.85, 0.85, 0.85 }
 
 # base is used to color a treeview with no rows
 
-       base[NORMAL] = { 0.64, 0.68, 0.54 }
-       base[ACTIVE] = { 0.64, 0.68, 0.54 }
-       base[PRELIGHT] = { 0.64, 0.68, 0.54 }
-       base[INSENSITIVE] = { 0.64, 0.68, 0.54 }
-       base[SELECTED] = { 0.64, 0.68, 0.54 }
+       base[NORMAL] = { 0.20, 0.20, 0.25 }
+       base[ACTIVE] = { 0.20, 0.20, 0.25 }
+       base[PRELIGHT] = { 0.20, 0.20, 0.25 }
+       base[INSENSITIVE] = { 0.20, 0.20, 0.25 }
+       base[SELECTED] = { 0.20, 0.20, 0.25 }
 
 }
 
 style "io_selector_port_list" = "medium_text"
 {
-
+       GtkTreeView::even-row-color = { 0.20, 0.20, 0.25 }
+       GtkTreeView::odd-row-color = { 0.20, 0.20, 0.25 }
 # fg is used to color the fg (text) of the column header button
 
-       fg[NORMAL] = { 0.80, 0.80, 0.70 }
-       fg[SELECTED] = { 0.80, 0.80, 0.70 }
-       fg[ACTIVE] = { 0.80, 0.80, 0.70 }
-       fg[PRELIGHT] = { 0.80, 0.80, 0.70 }
-       fg[INSENSITIVE] = { 0.80, 0.80, 0.70 }
+       fg[NORMAL] = { 0.70, 0.70, 0.70 }
+       fg[SELECTED] = { 0.70, 0.70, 0.70 }
+       fg[ACTIVE] = { 0.70, 0.70, 0.70 }
+       fg[PRELIGHT] = { 0.70, 0.70, 0.70 }
+       fg[INSENSITIVE] = { 0.70, 0.70, 0.70 }
 
 # bg is used used to color the background of the column header button
 
@@ -901,22 +907,22 @@ style "io_selector_port_list" = "medium_text"
 
 # text is used to color the treeview row text
 
-       text[NORMAL] = { 0.80, 0.80, 0.70 }
-       text[SELECTED] = { 0.80, 0.80, 0.70 }
+       text[NORMAL] = { 0.80, 0.80, 0.80 }
+       text[SELECTED] = { 0.80, 0.80, 0.80 }
 
 # base is used to color a treeview with no rows
 
-       base[NORMAL] = { 0, 0, 0 }
-       base[ACTIVE] = { 0, 0, 0 }
-       base[PRELIGHT] = { 0, 0, 0 }
-       base[INSENSITIVE] = { 0, 0, 0 }
-       base[SELECTED] = { 0, 0, 0 }
+       base[NORMAL] = { 0.20, 0.20, 0.25 }
+       base[ACTIVE] = { 0.20, 0.20, 0.25 }
+       base[PRELIGHT] = { 0.20, 0.20, 0.25 }
+       base[INSENSITIVE] = { 0.20, 0.20, 0.25 }
+       base[SELECTED] = { 0.20, 0.20, 0.25 }
 }
 
 style "io_selector_notebook" = "default_base"
 {
        fg[NORMAL] = { 1.0, 1.0, 1.0 }
-        font_name ="sans bold 10"
+        font_name ="sans bold 8"
 }
 
 style "tearoff_arrow" = "medium_bold_entry"
@@ -947,13 +953,13 @@ style "pan_slider"
 {
        font_name = "sans 8"
 
-       fg[NORMAL] = { 0.67, 0.23, 0.22 }
-       fg[ACTIVE] = { 0.67, 0.23, 0.22 }
+       fg[NORMAL] = { 0.22, 0.73, 0.22 }
+       fg[ACTIVE] = { 0.22, 0.73, 0.22 }
        fg[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
        fg[SELECTED] = { 0.67, 0.23, 0.22 }
        fg[PRELIGHT] = { 0.67, 0.23, 0.22 }
 
-       bg[NORMAL] = { 0, 0, 0 }
+       bg[NORMAL] = { 0.05, 0.05, 0.05 }
        bg[ACTIVE] = { 0, 0, 0 }
        bg[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
        bg[SELECTED] = { 0, 0, 0 }
@@ -964,6 +970,15 @@ style "pan_slider"
        text[INSENSITIVE] = { 0.70, 0.70, 0.70 }
        text[SELECTED] = { 0.70, 0.70, 0.70 }
        text[PRELIGHT] = { 0.70, 0.70, 0.70 }
+
+       # used to draw the triangular indicators 
+
+       base[NORMAL] = { 0.80, 0.80, 0.80 }
+       base[ACTIVE] =  { 0.80, 0.80, 0.80 }
+       base[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
+       base[SELECTED] = { 0.80, 0.80, 0.80 }
+       base[PRELIGHT] = { 0.80, 0.80, 0.80 }
+
 }
 
 style "region_list_whole_file"
@@ -981,7 +996,7 @@ style "ardour_button" ="default_buttons_menus"
 widget "*FirstActionMessage" style "first_action_message"
 widget "*VerboseCanvasCursor" style "verbose_canvas_cursor"
 widget "*MarkerText" style "marker_text"
-widget "*TimeAxisViewItemName" style "time_axis_view_item_name"
+widget "*TimeAxisViewItemName*" style "time_axis_view_item_name"
 #widget "*ExportProgress" style "default_buttons_menus"
 widget "*ExportFileLabel" style "small_bold_text"
 widget "*ExportFormatLabel" style "medium_bold_text"
@@ -1160,6 +1175,7 @@ widget "*EditorMainCanvas" style "main_canvas_area"
 widget "*AudioTrackControlsBaseInactiveUnselected" style "track_controls_inactive"
 widget "*BusControlsBaseInactiveUnselected" style "track_controls_inactive"
 widget "*AutomationTrackControlsBaseInactiveUnselected" style "track_controls_inactive"
+widget "*AutomationTrackName" style "automation_track_name"
 widget "*AudioTrackControlsBaseInactiveSelected" style "track_controls_inactive"
 widget "*BusControlsBaseInactiveSelected" style "track_controls_inactive"
 widget "*AutomationTrackControlsBaseInactiveSelected" style "track_controls_inactive"