new GUI appearance option to offer track/bus colors (muted) as backgrounds for editor & mixer strips
This commit is contained in:
@@ -1419,29 +1419,38 @@ MixerStrip::reset_strip_style ()
|
||||
|
||||
} else {
|
||||
|
||||
if (is_midi_track()) {
|
||||
if (_route->active()) {
|
||||
set_name ("MidiTrackStripBase");
|
||||
} else {
|
||||
set_name ("MidiTrackStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("MidiTrackFader");
|
||||
} else if (is_audio_track()) {
|
||||
if (_route->active()) {
|
||||
set_name ("AudioTrackStripBase");
|
||||
} else {
|
||||
set_name ("AudioTrackStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("AudioTrackFader");
|
||||
} else {
|
||||
if (_route->active()) {
|
||||
set_name ("AudioBusStripBase");
|
||||
} else {
|
||||
set_name ("AudioBusStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("AudioBusFader");
|
||||
if (UIConfiguration::instance().get_use_route_color_for_bg()) {
|
||||
|
||||
/* (no MIDI busses yet) */
|
||||
set_bg_color_from_route (*this, true);
|
||||
|
||||
} else {
|
||||
|
||||
set_bg_color_from_route (*this, false);
|
||||
|
||||
if (is_midi_track()) {
|
||||
if (_route->active()) {
|
||||
set_name ("MidiTrackStripBase");
|
||||
} else {
|
||||
set_name ("MidiTrackStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("MidiTrackFader");
|
||||
} else if (is_audio_track()) {
|
||||
if (_route->active()) {
|
||||
set_name ("AudioTrackStripBase");
|
||||
} else {
|
||||
set_name ("AudioTrackStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("AudioTrackFader");
|
||||
} else {
|
||||
if (_route->active()) {
|
||||
set_name ("AudioBusStripBase");
|
||||
} else {
|
||||
set_name ("AudioBusStripBaseInactive");
|
||||
}
|
||||
gpm.set_fader_name ("AudioBusFader");
|
||||
|
||||
/* (no MIDI busses yet) */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1792,6 +1801,8 @@ MixerStrip::parameter_changed (string p)
|
||||
}
|
||||
} else if (p == "show-triggers-inline") {
|
||||
/* XXX do something or get rid of this parameter */
|
||||
} else if (p == "use-route-color-for-bg") {
|
||||
reset_strip_style ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2100,4 +2111,3 @@ MixerStrip::set_trigger_display (boost::shared_ptr<TriggerBox> tb)
|
||||
_tmaster->set_triggerbox (tb);
|
||||
trigger_display.set_triggerbox (tb.get());
|
||||
}
|
||||
|
||||
|
||||
@@ -2521,6 +2521,13 @@ RCOptionEditor::RCOptionEditor ()
|
||||
|
||||
add_option (_("Appearance"), new OptionEditorHeading (_("Theme")));
|
||||
|
||||
add_option (_("Appearance"), new BoolOption (
|
||||
"use-route-color-for-bg",
|
||||
_("Use track/bus colors in backgrounds"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_use_route_color_for_bg),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_use_route_color_for_bg)
|
||||
));
|
||||
|
||||
add_option (_("Appearance"), new BoolOption (
|
||||
"flat-buttons",
|
||||
_("Draw \"flat\" buttons"),
|
||||
|
||||
@@ -497,6 +497,8 @@ RouteTimeAxisView::parameter_changed (string const & p)
|
||||
} else {
|
||||
gm.get_level_meter().set_max_audio_meter_count (0);
|
||||
}
|
||||
} else if (p == "use-route-color-for-bg") {
|
||||
route_color_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1034,6 +1036,8 @@ RouteTimeAxisView::route_color_changed ()
|
||||
_view->apply_color (color(), StreamView::RegionColor);
|
||||
}
|
||||
number_label.set_fixed_colors (gdk_color_to_rgba (color()), gdk_color_to_rgba (color()));
|
||||
|
||||
set_bg_color_from_route (controls_ebox, UIConfiguration::instance().get_use_route_color_for_bg());
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -2743,3 +2743,37 @@ RouteUI::rename_current_playlist ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::set_bg_color_from_route (Gtk::Widget& w, bool yn)
|
||||
{
|
||||
using namespace ARDOUR_UI_UTILS;
|
||||
|
||||
Glib::RefPtr<Gtk::RcStyle> rc = w.get_modifier_style ();
|
||||
|
||||
if (yn) {
|
||||
Gdk::Color lighter_bg;
|
||||
|
||||
HSV l (gdk_color_to_rgba (route_color()));
|
||||
l.h += std::min (l.h + 0.08, 1.0);
|
||||
l.s = 0.15;
|
||||
l.v -= std::max (0.0, 0.05);
|
||||
set_color_from_rgba (lighter_bg, l.color ());
|
||||
|
||||
rc->set_bg (Gtk::STATE_PRELIGHT, lighter_bg);
|
||||
rc->set_bg (Gtk::STATE_NORMAL, lighter_bg);
|
||||
rc->set_bg (Gtk::STATE_SELECTED, lighter_bg);
|
||||
rc->set_bg (Gtk::STATE_ACTIVE, lighter_bg);
|
||||
rc->set_color_flags (Gtk::STATE_PRELIGHT, Gtk::RC_BG);
|
||||
rc->set_color_flags (Gtk::STATE_NORMAL, Gtk::RC_BG);
|
||||
rc->set_color_flags (Gtk::STATE_SELECTED, Gtk::RC_BG);
|
||||
rc->set_color_flags (Gtk::STATE_ACTIVE, Gtk::RC_BG);
|
||||
} else {
|
||||
rc->unset_color_flags (Gtk::STATE_PRELIGHT, Gtk::RC_BG);
|
||||
rc->unset_color_flags (Gtk::STATE_NORMAL, Gtk::RC_BG);
|
||||
rc->unset_color_flags (Gtk::STATE_SELECTED, Gtk::RC_BG);
|
||||
rc->unset_color_flags (Gtk::STATE_ACTIVE, Gtk::RC_BG);
|
||||
}
|
||||
|
||||
w.modify_style (rc);
|
||||
}
|
||||
|
||||
@@ -241,6 +241,7 @@ protected:
|
||||
bool verify_new_route_name (const std::string& name);
|
||||
void check_rec_enable_sensitivity ();
|
||||
void route_gui_changed (PBD::PropertyChange const&);
|
||||
void set_bg_color_from_route (Gtk::Widget&, bool yn);
|
||||
|
||||
PatchChangeGridDialog* patch_change_dialog () const;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ UI_CONFIG_VARIABLE (bool, all_floating_windows_are_dialogs, "all-floating-window
|
||||
UI_CONFIG_VARIABLE (bool, floating_monitor_section, "floating-monitor-section", false)
|
||||
UI_CONFIG_VARIABLE (bool, transients_follow_front, "transients-follow-front", false)
|
||||
UI_CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-track-color", false)
|
||||
UI_CONFIG_VARIABLE (bool, use_route_color_for_bg, "use-route-color-for-bg", false)
|
||||
UI_CONFIG_VARIABLE (uint32_t, vertical_region_gap, "vertical-region-gap", 0)
|
||||
UI_CONFIG_VARIABLE (bool, editor_stereo_only_meters, "editor-stereo-only-meters", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_waveform_clipping, "show-waveform-clipping", true)
|
||||
|
||||
Reference in New Issue
Block a user