Move Scroomer out of Track Selection Box:

* no horiz space between Piano-Roll & Track
* 1:1 mapping of note's vertical space (no border)
This commit is contained in:
Robin Gareus 2014-09-08 18:43:08 +02:00
parent 6bb573d81c
commit b9f0751438
3 changed files with 21 additions and 0 deletions

View File

@ -213,14 +213,23 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
tracks.
*/
HSeparator* separator = manage (new HSeparator());
separator->set_name("TrackSeparator");
separator->set_size_request(-1, 1);
separator->show();
VBox* v = manage (new VBox);
HBox* h = manage (new HBox);
h->pack_end (*_piano_roll_header);
h->pack_end (*_piano_roll_header);
h->pack_end (*_range_scroomer);
v->pack_start (*separator, false, false);
v->pack_start (*h, true, true);
v->show ();
h->show ();
top_hbox.remove(scroomer_placeholder);
time_axis_hbox.pack_end(*v, false, false, 0);
midi_scroomer_size_group->add_widget (*v);
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
time_axis_frame.set_name ("MidiTrackControlsBaseUnselected");

View File

@ -75,6 +75,7 @@ int const TimeAxisView::_max_order = 512;
unsigned int TimeAxisView::name_width_px = 100; // TODO adjust with font-scaling on style-change
PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::controls_meters_size_group = Glib::RefPtr<Gtk::SizeGroup>();
Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::midi_scroomer_size_group = Glib::RefPtr<Gtk::SizeGroup>();
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
: AxisView (sess)
@ -104,6 +105,9 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
if (!controls_meters_size_group) {
controls_meters_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
}
if (!midi_scroomer_size_group) {
midi_scroomer_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
}
if (extra_height == 0) {
compute_heights ();
}
@ -192,11 +196,16 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
separator->set_size_request(-1, 1);
separator->show();
scroomer_placeholder.set_size_request (-1, -1);
scroomer_placeholder.show();
midi_scroomer_size_group->add_widget (scroomer_placeholder);
time_axis_vbox.pack_start (*separator, false, false);
time_axis_vbox.pack_start (time_axis_frame, true, true);
time_axis_vbox.show();
time_axis_hbox.pack_start (time_axis_vbox, true, true);
time_axis_hbox.show();
top_hbox.pack_start (scroomer_placeholder, false, false);
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));

View File

@ -24,6 +24,7 @@
#include <list>
#include <gtkmm/box.h>
#include <gtkmm/fixed.h>
#include <gtkmm/frame.h>
#include <gtkmm/drawingarea.h>
#include <gtkmm/eventbox.h>
@ -203,6 +204,7 @@ class TimeAxisView : public virtual AxisView
protected:
static Glib::RefPtr<Gtk::SizeGroup> controls_meters_size_group;
static Glib::RefPtr<Gtk::SizeGroup> midi_scroomer_size_group;
static unsigned int name_width_px;
/* The Standard LHS Controls */
Gtk::Table controls_table;
@ -215,6 +217,7 @@ class TimeAxisView : public virtual AxisView
Gtk::HBox name_hbox;
Gtk::HBox top_hbox;
Gtk::Label name_label;
Gtk::Fixed scroomer_placeholder;
bool _name_editing;
uint32_t height; /* in canvas units */
std::string controls_base_unselected_name;