diff options
author | Jesse Chappell <jesse@essej.net> | 2006-12-30 06:37:00 +0000 |
---|---|---|
committer | Jesse Chappell <jesse@essej.net> | 2006-12-30 06:37:00 +0000 |
commit | 4fa71e154f3cebb3d4bf8f46ec3f19d6aeaded72 (patch) | |
tree | 7f3f188b8ef69fbc29599d1cf810406e7a8a8c98 | |
parent | 34a813c1a13263c2f37b945771093f428efb9692 (diff) |
tweaked panner appearance and consistency, panner line now distinct color from triangles. shift-click now reverts panner to center, left or right depending on number of channels. minor updates to osx app build script. fixed region editor re-show problem.
git-svn-id: svn://localhost/ardour2/trunk@1253 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour.bindings | 3 | ||||
-rw-r--r-- | gtk2_ardour/ardour2_ui.rc | 6 | ||||
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/panner.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 46 | ||||
-rw-r--r-- | libs/gtkmm2ext/barcontroller.cc | 9 | ||||
-rwxr-xr-x | tools/osx_packaging/app_build.rb | 5 | ||||
-rw-r--r-- | tools/osx_packaging/ardour2_mac_ui.rc | 80 |
8 files changed, 95 insertions, 63 deletions
diff --git a/gtk2_ardour/ardour.bindings b/gtk2_ardour/ardour.bindings index bf5df40e9e..86f50e139f 100644 --- a/gtk2_ardour/ardour.bindings +++ b/gtk2_ardour/ardour.bindings @@ -121,7 +121,6 @@ ; (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") @@ -277,7 +276,6 @@ ; (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") @@ -300,7 +298,6 @@ ; (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") diff --git a/gtk2_ardour/ardour2_ui.rc b/gtk2_ardour/ardour2_ui.rc index 771210829d..8ce91c4d39 100644 --- a/gtk2_ardour/ardour2_ui.rc +++ b/gtk2_ardour/ardour2_ui.rc @@ -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 } diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index c71abe8676..a40e497982 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -716,6 +716,7 @@ AudioRegionView::show_region_editor () } editor->present (); + editor->show_all(); } void diff --git a/gtk2_ardour/panner.cc b/gtk2_ardour/panner.cc index a447b69935..bb9b432184 100644 --- a/gtk2_ardour/panner.cc +++ b/gtk2_ardour/panner.cc @@ -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); diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 46d69b7a79..72cd24bcce 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -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; } diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index 5dff70cedf..f59d192ff1 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -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: diff --git a/tools/osx_packaging/app_build.rb b/tools/osx_packaging/app_build.rb index c81225024b..4cab635034 100755 --- a/tools/osx_packaging/app_build.rb +++ b/tools/osx_packaging/app_build.rb @@ -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") diff --git a/tools/osx_packaging/ardour2_mac_ui.rc b/tools/osx_packaging/ardour2_mac_ui.rc index 775a1247bf..c4d5e776ef 100644 --- a/tools/osx_packaging/ardour2_mac_ui.rc +++ b/tools/osx_packaging/ardour2_mac_ui.rc @@ -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" |