mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Transport Layout:
* Remove some redundant containers and frames, for a cleaner look. * Adjust transport button spacing and sizes to more closely match the editor toolbar.
This commit is contained in:
parent
33b1dea98a
commit
448f921dd8
5 changed files with 20 additions and 33 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue