HIG-ify the locations UI a bit. Should fix #3526.
git-svn-id: svn://localhost/ardour2/branches/3.0@7979 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
94e069b14a
commit
dc65bd801c
@ -668,19 +668,40 @@ LocationUI::LocationUI ()
|
||||
{
|
||||
i_am_the_modifier = 0;
|
||||
|
||||
location_vpacker.set_spacing (5);
|
||||
|
||||
add_location_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::ADD, Gtk::ICON_SIZE_BUTTON)));
|
||||
add_range_button.set_image (*Gtk::manage (new Gtk::Image (Gtk::Stock::ADD, Gtk::ICON_SIZE_BUTTON)));
|
||||
VBox* vbox = manage (new VBox);
|
||||
|
||||
Table* table = manage (new Table (2, 2));
|
||||
table->set_spacings (4);
|
||||
table->set_col_spacing (0, 32);
|
||||
int table_row = 0;
|
||||
|
||||
Label* l = manage (new Label (_("<b>Loop/Punch Ranges</b>")));
|
||||
l->set_alignment (0, 0.5);
|
||||
l->set_use_markup (true);
|
||||
table->attach (*l, 0, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
loop_punch_box.pack_start (loop_edit_row, false, false);
|
||||
loop_punch_box.pack_start (punch_edit_row, false, false);
|
||||
|
||||
loop_punch_scroller.add (loop_punch_box);
|
||||
loop_punch_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
|
||||
loop_punch_scroller.set_shadow_type (Gtk::SHADOW_NONE);
|
||||
table->attach (loop_punch_box, 1, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
vbox->pack_start (*table, true, true);
|
||||
|
||||
location_vpacker.pack_start (loop_punch_scroller, false, false);
|
||||
table = manage (new Table (3, 2));
|
||||
table->set_spacings (4);
|
||||
table->set_col_spacing (0, 32);
|
||||
table_row = 0;
|
||||
|
||||
table->attach (*manage (new Label ("")), 0, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
l = manage (new Label (_("<b>Markers (Including CD Index)</b>")));
|
||||
l->set_alignment (0, 0.5);
|
||||
l->set_use_markup (true);
|
||||
table->attach (*l, 0, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
location_rows.set_name("LocationLocRows");
|
||||
location_rows_scroller.add (location_rows);
|
||||
@ -697,17 +718,25 @@ LocationUI::LocationUI ()
|
||||
loc_frame_box.pack_start (location_rows_scroller, true, true);
|
||||
|
||||
add_location_button.set_name ("LocationAddLocationButton");
|
||||
|
||||
table->attach (loc_frame_box, 1, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
loc_range_panes.pack1 (*table, true, false);
|
||||
|
||||
table = manage (new Table (3, 2));
|
||||
table->set_spacings (4);
|
||||
table->set_col_spacing (0, 32);
|
||||
table_row = 0;
|
||||
|
||||
table->attach (*manage (new Label ("")), 0, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
HBox* add_button_box = manage (new HBox);
|
||||
|
||||
// loc_frame_box.pack_start (add_location_button, false, false);
|
||||
add_button_box->pack_start (add_location_button, true, true);
|
||||
|
||||
loc_frame.set_name ("LocationLocEditorFrame");
|
||||
loc_frame.set_label (_("Markers (including CD index)"));
|
||||
loc_frame.add (loc_frame_box);
|
||||
loc_range_panes.pack1(loc_frame, true, false);
|
||||
|
||||
l = manage (new Label (_("<b>Ranges (Including CD Track Ranges)</b>")));
|
||||
l->set_alignment (0, 0.5);
|
||||
l->set_use_markup (true);
|
||||
table->attach (*l, 0, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
range_rows.set_name("LocationRangeRows");
|
||||
range_rows_scroller.add (range_rows);
|
||||
@ -721,18 +750,20 @@ LocationUI::LocationUI ()
|
||||
range_frame_box.pack_start (range_rows_scroller, true, true);
|
||||
|
||||
add_range_button.set_name ("LocationAddRangeButton");
|
||||
//range_frame_box.pack_start (add_range_button, false, false);
|
||||
|
||||
table->attach (range_frame_box, 1, 2, table_row, table_row + 1);
|
||||
++table_row;
|
||||
|
||||
loc_range_panes.pack2 (*table, true, false);
|
||||
|
||||
HBox* add_button_box = manage (new HBox);
|
||||
add_button_box->pack_start (add_location_button, true, true);
|
||||
add_button_box->pack_start (add_range_button, true, true);
|
||||
|
||||
range_frame.set_name ("LocationRangeEditorFrame");
|
||||
range_frame.set_label (_("Ranges (including CD track ranges)"));
|
||||
range_frame.add (range_frame_box);
|
||||
loc_range_panes.pack2(range_frame, true, false);
|
||||
location_vpacker.pack_start (loc_range_panes, true, true);
|
||||
location_vpacker.pack_start (*add_button_box, false, false);
|
||||
vbox->pack_start (loc_range_panes);
|
||||
vbox->pack_start (*add_button_box, false, false);
|
||||
|
||||
pack_start (location_vpacker, true, true);
|
||||
pack_start (*vbox);
|
||||
|
||||
add_location_button.signal_clicked().connect (sigc::mem_fun(*this, &LocationUI::add_new_location));
|
||||
add_range_button.signal_clicked().connect (sigc::mem_fun(*this, &LocationUI::add_new_range));
|
||||
|
@ -158,22 +158,17 @@ class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||
|
||||
void session_going_away ();
|
||||
|
||||
Gtk::VBox location_vpacker;
|
||||
|
||||
LocationEditRow loop_edit_row;
|
||||
LocationEditRow punch_edit_row;
|
||||
Gtk::VBox loop_punch_box;
|
||||
Gtk::ScrolledWindow loop_punch_scroller;
|
||||
|
||||
Gtk::VPaned loc_range_panes;
|
||||
|
||||
Gtk::Frame loc_frame;
|
||||
Gtk::VBox loc_frame_box;
|
||||
Gtk::Button add_location_button;
|
||||
Gtk::ScrolledWindow location_rows_scroller;
|
||||
Gtk::VBox location_rows;
|
||||
|
||||
Gtk::Frame range_frame;
|
||||
Gtk::VBox range_frame_box;
|
||||
Gtk::Button add_range_button;
|
||||
Gtk::ScrolledWindow range_rows_scroller;
|
||||
|
Loading…
Reference in New Issue
Block a user