#include "canvas/rectangle.h"
#include "canvas/debug.h"
+#include "ardour/profile.h"
+
#include "ardour_ui.h"
#include "ardour_dialog.h"
#include "global_signals.h"
uint32_t TimeAxisView::button_height = 0;
uint32_t TimeAxisView::extra_height = 0;
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>();
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
: AxisView (sess)
- , controls_table (4, 4)
+ , controls_table (3, 3)
, controls_button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_BOTH))
, _name_editing (false)
, height (0)
, _have_preresize_cursor (false)
, _ebox_release_can_act (true)
{
+ if (!controls_meters_size_group) {
+ controls_meters_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
+ }
if (extra_height == 0) {
compute_heights ();
}
delete an_entry;
name_hbox.pack_end (name_label, true, true);
- name_hbox.set_size_request(100, 0); // XXX min header width (if fader is not visible)
+
+ // set min. track-header width if fader is not visible
+ name_hbox.set_size_request(name_width_px, 0);
+
name_hbox.show ();
name_label.show ();
controls_table.set_col_spacings (2);
controls_table.set_border_width (2);
- controls_table.attach (name_hbox, 4, 5, 0, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+ if (ARDOUR::Profile->get_mixbus() ) {
+ controls_table.attach (name_hbox, 4, 5, 0, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+ } else {
+ controls_table.attach (name_hbox, 1, 2, 0, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+ }
controls_table.show_all ();
controls_table.set_no_show_all ();
top_hbox.pack_start (controls_vbox, true, true);
top_hbox.show ();
- //controls_ebox.set_name ("TimeAxisViewControlsBaseUnselected");
controls_ebox.add (top_hbox);
controls_ebox.add_events (Gdk::BUTTON_PRESS_MASK|
Gdk::BUTTON_RELEASE_MASK|
controls_ebox.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave));
controls_ebox.show ();
- time_axis_frame.set_shadow_type (Gtk::SHADOW_OUT);
+ time_axis_frame.set_shadow_type (Gtk::SHADOW_NONE);
time_axis_frame.add(controls_ebox);
time_axis_frame.show();
+ HSeparator* separator = manage (new HSeparator());
+ separator->set_name("TrackSeparator");
+ separator->set_size_request(-1, 1);
+ separator->show();
+
+ time_axis_vbox.pack_start (time_axis_frame, true, true);
+ time_axis_vbox.pack_end (*separator, false, false);
+ time_axis_vbox.show();
+
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
_canvas_display->hide ();
if (control_parent) {
- control_parent->remove (time_axis_frame);
+ control_parent->remove (time_axis_vbox);
control_parent = 0;
}
TimeAxisView::show_at (double y, int& nth, VBox *parent)
{
if (control_parent) {
- control_parent->reorder_child (time_axis_frame, nth);
+ control_parent->reorder_child (time_axis_vbox, nth);
} else {
control_parent = parent;
- parent->pack_start (time_axis_frame, false, false);
- parent->reorder_child (time_axis_frame, nth);
+ parent->pack_start (time_axis_vbox, false, false);
+ parent->reorder_child (time_axis_vbox, nth);
}
_order = nth;
h = preset_height (HeightSmall);
}
- time_axis_frame.property_height_request () = h;
+ time_axis_vbox.property_height_request () = h;
height = h;
char buf[32];
time_axis_frame.set_name ("MixerStripSelectedFrame");
controls_ebox.set_name (controls_base_selected_name);
controls_vbox.set_name (controls_base_selected_name);
+ time_axis_vbox.set_name (controls_base_selected_name);
} else {
- time_axis_frame.set_shadow_type (Gtk::SHADOW_OUT);
+ time_axis_frame.set_shadow_type (Gtk::SHADOW_NONE);
time_axis_frame.set_name (controls_base_unselected_name);
controls_ebox.set_name (controls_base_unselected_name);
controls_vbox.set_name (controls_base_unselected_name);
+ time_axis_vbox.set_name (controls_base_unselected_name);
hide_selection ();
{
// TODO this function should be re-evaluated when font-scaling changes (!)
Gtk::Window window (Gtk::WINDOW_TOPLEVEL);
- Gtk::Table one_row_table (1, 8);
+ Gtk::Table one_row_table (1, 1);
ArdourButton* test_button = manage (new ArdourButton);
const int border_width = 2;
const int frame_height = 2;