mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
Make it more obvious when a track is Inactive
Inactive tracks will now hide all controls and display only the track name in parenthesis. Color-change is not sufficient by itself to distinguish an inactive track from an active one (consider the case of just 2 tracks...)
This commit is contained in:
parent
7966d02534
commit
d8d737adc4
5 changed files with 34 additions and 0 deletions
|
|
@ -290,6 +290,15 @@ void
|
||||||
AudioTimeAxisView::route_active_changed ()
|
AudioTimeAxisView::route_active_changed ()
|
||||||
{
|
{
|
||||||
update_control_names ();
|
update_control_names ();
|
||||||
|
|
||||||
|
if (!_route->active()) {
|
||||||
|
controls_table.hide();
|
||||||
|
inactive_table.show_all();
|
||||||
|
RouteTimeAxisView::hide_all_automation();
|
||||||
|
} else {
|
||||||
|
inactive_table.hide();
|
||||||
|
controls_table.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
|
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
|
#include <gtkmm/table.h>
|
||||||
#include <gdkmm/color.h>
|
#include <gdkmm/color.h>
|
||||||
|
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
|
|
@ -123,6 +124,9 @@ protected:
|
||||||
|
|
||||||
Gtk::Label name_label;
|
Gtk::Label name_label;
|
||||||
|
|
||||||
|
Gtk::Label inactive_label;
|
||||||
|
Gtk::Table inactive_table;
|
||||||
|
|
||||||
mutable boost::unordered_map<std::string, std::string> property_hashtable;
|
mutable boost::unordered_map<std::string, std::string> property_hashtable;
|
||||||
}; /* class AxisView */
|
}; /* class AxisView */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1361,6 +1361,15 @@ MidiTimeAxisView::route_active_changed ()
|
||||||
{
|
{
|
||||||
RouteUI::route_active_changed ();
|
RouteUI::route_active_changed ();
|
||||||
update_control_names();
|
update_control_names();
|
||||||
|
|
||||||
|
if (!_route->active()) {
|
||||||
|
controls_table.hide();
|
||||||
|
inactive_table.show_all();
|
||||||
|
RouteTimeAxisView::hide_all_automation();
|
||||||
|
} else {
|
||||||
|
inactive_table.hide();
|
||||||
|
controls_table.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||||
}
|
}
|
||||||
|
|
||||||
update_track_number_visibility();
|
update_track_number_visibility();
|
||||||
|
route_active_changed();
|
||||||
label_view ();
|
label_view ();
|
||||||
|
|
||||||
if (ARDOUR::Profile->get_mixbus()) {
|
if (ARDOUR::Profile->get_mixbus()) {
|
||||||
|
|
@ -424,6 +425,9 @@ RouteTimeAxisView::label_view ()
|
||||||
if (x != name_label.get_text ()) {
|
if (x != name_label.get_text ()) {
|
||||||
name_label.set_text (x);
|
name_label.set_text (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inactive_label.set_text (string_compose("(%1)", x));
|
||||||
|
|
||||||
const int64_t track_number = _route->track_number ();
|
const int64_t track_number = _route->track_number ();
|
||||||
if (track_number == 0) {
|
if (track_number == 0) {
|
||||||
number_label.set_text ("");
|
number_label.set_text ("");
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,10 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||||
name_label.set_width_chars (12);
|
name_label.set_width_chars (12);
|
||||||
set_tooltip (name_label, _("Track/Bus name (double click to edit)"));
|
set_tooltip (name_label, _("Track/Bus name (double click to edit)"));
|
||||||
|
|
||||||
|
inactive_label.set_name (X_("TrackNameEditor"));
|
||||||
|
inactive_label.set_alignment (0.0, 0.5);
|
||||||
|
set_tooltip (inactive_label, _("This track is inactive. (right-click to activate)"));
|
||||||
|
|
||||||
{
|
{
|
||||||
boost::scoped_ptr<Gtk::Entry> an_entry (new FocusEntry);
|
boost::scoped_ptr<Gtk::Entry> an_entry (new FocusEntry);
|
||||||
an_entry->set_name (X_("TrackNameEditor"));
|
an_entry->set_name (X_("TrackNameEditor"));
|
||||||
|
|
@ -185,6 +189,10 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||||
controls_table.show_all ();
|
controls_table.show_all ();
|
||||||
controls_table.set_no_show_all ();
|
controls_table.set_no_show_all ();
|
||||||
|
|
||||||
|
inactive_table.set_border_width (4); //try to match the offset of the label on an "active" track
|
||||||
|
inactive_table.attach (inactive_label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0);
|
||||||
|
controls_vbox.pack_start (inactive_table, false, false);
|
||||||
|
|
||||||
controls_vbox.pack_start (controls_table, false, false);
|
controls_vbox.pack_start (controls_table, false, false);
|
||||||
controls_vbox.show ();
|
controls_vbox.show ();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue