Transport Layout:
authorBen Loftis <ben@harrisonconsoles.com>
Sun, 18 Dec 2016 15:02:13 +0000 (09:02 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Sun, 18 Dec 2016 15:02:13 +0000 (09:02 -0600)
* Remove some redundant containers and frames, for a cleaner look.
* Adjust transport button spacing and sizes to more closely match the editor toolbar.

gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_dependents.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/mini_timeline.cc

index 5de72d5682462d220134d5ba3ae8c0c31c4b8079..8d0e9a3b88824cf61c1768dbad255bf4cb92b923 100644 (file)
@@ -397,9 +397,11 @@ ARDOUR_UI::setup_transport ()
 
        /* top level packing */
        transport_table.set_spacings (0);
+       transport_table.set_row_spacings (4);
        transport_table.set_border_width (2);
        transport_frame.add (transport_table);
        transport_frame.set_name ("BaseFrame");
+       transport_frame.set_shadow_type (Gtk::SHADOW_NONE);
 
        transport_table.signal_expose_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::transport_expose), false);
 
@@ -407,7 +409,7 @@ ARDOUR_UI::setup_transport ()
        click_button.set_size_request (PX_SCALE(20), PX_SCALE(20));
 
        HBox* tbox = manage (new HBox);
-       tbox->set_spacing (PX_SCALE(1));
+       tbox->set_spacing (PX_SCALE(2));
 
        tbox->pack_start (midi_panic_button, true, true, 0);
        tbox->pack_start (click_button, true, true, 0);
@@ -438,13 +440,12 @@ ARDOUR_UI::setup_transport ()
        button_height_size_group->add_widget (*secondary_clock->right_btn());
 
        button_height_size_group->add_widget (stop_button);
-       button_height_size_group->add_widget (sync_button);
-       button_height_size_group->add_widget (layered_button);
+//     button_height_size_group->add_widget (sync_button);
+//     button_height_size_group->add_widget (layered_button);
        button_height_size_group->add_widget (auto_return_button);
        button_height_size_group->add_widget (editor_visibility_button);
        button_height_size_group->add_widget (mixer_visibility_button);
 
-
        Glib::RefPtr<SizeGroup> clock1_size_group = SizeGroup::create (SIZE_GROUP_BOTH);
        clock1_size_group->add_widget (*primary_clock->left_btn());
        clock1_size_group->add_widget (*primary_clock->right_btn());
@@ -463,9 +464,6 @@ ARDOUR_UI::setup_transport ()
        transport_table.attach (layered_label, 2, 3, 1, 2 , FILL, SHRINK, 3, 0);
 
        transport_table.attach (punch_in_button, 3, 4, 0, 1 , FILL, SHRINK, 0, 2);
-//     EventBox* spacer = manage (new EventBox);//  spacer->set_size_request(1,-1);
-//     transport_table.attach (*spacer, 4, 5, 0, 1 , SHRINK, SHRINK, 1, 0);
-       transport_table.attach (*(manage (new Label (""))), 4, 5, 0, 1 , FILL, SHRINK, 1, 0);
        transport_table.attach (punch_out_button, 5, 6, 0, 1 , FILL, SHRINK, 0, 2);
        transport_table.attach (layered_button, 3, 6, 1, 2 , FILL, SHRINK, 0, 2);
 
index ec4462f3240a78a1cb802ee687774ac5a1617811..d512601bd45a72efd6c7a429cf55f641e7736677 100644 (file)
@@ -237,6 +237,7 @@ ARDOUR_UI::setup_windows ()
 
        keyboard->setup_keybindings ();
 
+       _tabs.set_show_border(false);
        _tabs.signal_switch_page().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_switch));
        _tabs.signal_page_added().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_added));
        _tabs.signal_page_removed().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_removed));
index 598a46ad4ee9aea48021c90cfa6227bad322c8bd..3757e3a5e11f4c70e0f7105a98d377c4b7603bbd 100644 (file)
@@ -386,7 +386,6 @@ Editor::Editor ()
        , _visible_track_count (-1)
        ,  toolbar_selection_clock_table (2,3)
        ,  automation_mode_button (_("mode"))
-       ,  _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
        , selection (new Selection (this))
        , cut_buffer (new Selection (this))
        , _selection_memento (new SelectionMemento())
@@ -756,13 +755,10 @@ Editor::Editor ()
                }
        }
 
-       top_hbox.pack_start (toolbar_frame);
-
-       HBox *hbox = manage (new HBox);
-       hbox->pack_start (edit_pane, true, true);
-
-       global_vpacker.pack_start (top_hbox, false, false);
-       global_vpacker.pack_start (*hbox, true, true);
+       global_vpacker.set_spacing (2);
+       global_vpacker.set_border_width (0);
+       global_vpacker.pack_start (toolbar_hbox, false, false);
+       global_vpacker.pack_start (edit_pane, true, true);
        global_hpacker.pack_start (global_vpacker, true, true);
 
        /* need to show the "contents" widget so that notebook will show if tab is switched to
@@ -3176,7 +3172,7 @@ Editor::setup_toolbar ()
        hbox->set_spacing(2);
 
        toolbar_hbox.set_spacing (2);
-       toolbar_hbox.set_border_width (1);
+       toolbar_hbox.set_border_width (2);
 
        toolbar_hbox.pack_start (*mode_box, false, false);
        if (!ARDOUR::Profile->get_trx()) {
@@ -3190,17 +3186,6 @@ Editor::setup_toolbar ()
        }
 
        hbox->show_all ();
-
-       toolbar_base.set_name ("ToolBarBase");
-       toolbar_base.add (toolbar_hbox);
-
-       _toolbar_viewport.add (toolbar_base);
-       /* stick to the required height but allow width to vary if there's not enough room */
-       _toolbar_viewport.set_size_request (1, -1);
-
-       toolbar_frame.set_shadow_type (SHADOW_OUT);
-       toolbar_frame.set_name ("BaseFrame");
-       toolbar_frame.add (_toolbar_viewport);
 }
 
 void
index 0321f45e4c8a5bf7695bfcc25b5c3f5a03a46f07..0b692c3ff2c5f93d093f703191d7131672d3a12f 100644 (file)
@@ -1054,7 +1054,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        Gtk::HBox           toplevel_hpacker;
 
-       Gtk::HBox           top_hbox;
        Gtk::HBox           bottom_hbox;
 
        Gtk::Table          edit_packer;
@@ -1823,9 +1822,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void setup_tooltips ();
 
        Gtk::HBox                toolbar_hbox;
-       Gtk::EventBox            toolbar_base;
-       Gtk::Frame               toolbar_frame;
-       Gtk::Viewport           _toolbar_viewport;
 
        void setup_midi_toolbar ();
 
index d0505099096f48f5a09cb7362e9fa9a64fadda25..23de27eb3cd84cac29c09001209d50ee525845df 100644 (file)
@@ -278,6 +278,9 @@ MiniTimeline::draw_mark (cairo_t* cr, int x0, int x1, int h, const std::string&
                cairo_rectangle (cr, x0, y, rw - x0, h);
                cairo_set_source_rgba (cr, r, g, b, 0.5);
                cairo_fill_preserve (cr);
+               cairo_set_source_rgba (cr, r, g, b, 1.0);
+               cairo_set_line_width (cr, 1.0);
+               cairo_stroke_preserve (cr);
                cairo_clip (cr);
 
                // marker label
@@ -295,7 +298,7 @@ MiniTimeline::draw_mark (cairo_t* cr, int x0, int x1, int h, const std::string&
        cairo_rel_line_to (cr, w2, -h1);
        cairo_rel_line_to (cr, 0, -h0);
        cairo_close_path (cr);
-       cairo_set_source_rgba (cr, r, g, b, 1.0);
+       cairo_set_source_rgba (cr, r, g, b, a);
        cairo_set_line_width (cr, 1.0);
        cairo_stroke_preserve (cr);
        cairo_fill (cr);
@@ -384,7 +387,11 @@ MiniTimeline::render (cairo_t* cr, cairo_rectangle_t*)
        framepos_t lmin = std::max ((framepos_t)0, (p - time_span_samples));
        framepos_t lmax = p + time_span_samples;
 
-       const int mh = std::min (.4f * get_height(), get_height() - _time_height - 8.f);
+       int tw, th;
+       _layout->set_text( X_("Marker@") );
+       _layout->get_pixel_size (tw, th);
+
+       const int mh = th + 2;
        assert (mh > 4);
        const int mw = (mh - 1) / 4;