red-border selection for tracks, regions, and processors. requesting comments
This commit is contained in:
parent
40c3e4122c
commit
bf13bf6385
@ -159,7 +159,7 @@
|
||||
<Option name="tempo bar" value="70727fcc"/>
|
||||
<Option name="tempo marker" value="f2425bff"/>
|
||||
<Option name="time axis frame" value="000000ff"/>
|
||||
<Option name="selected time axis frame" value="000000ff"/>
|
||||
<Option name="selected time axis frame" value="ee0000ff"/>
|
||||
<Option name="time stretch fill" value="e2b5b596"/>
|
||||
<Option name="time stretch outline" value="63636396"/>
|
||||
<Option name="tracknumber label: fill" value="444444ff"/>
|
||||
|
@ -445,14 +445,14 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
//some buttons (like processor boxes) can be selected (so they can be deleted). Draw a white box around them
|
||||
//some buttons (like processor boxes) can be selected (so they can be deleted). Draw a selection indicator
|
||||
if (visual_state() & Gtkmm2ext::Selected) {
|
||||
#if 0 // outline, edge + 1px outside
|
||||
cairo_set_line_width(cr, 2);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.75);
|
||||
cairo_set_source_rgba (cr, 1, 0, 0, 0.8);
|
||||
#else // replace edge (if any)
|
||||
cairo_set_line_width(cr, 1);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 1.0);
|
||||
cairo_set_source_rgba (cr, 1, 0, 0, 0.8);
|
||||
#endif
|
||||
rounded_function (cr, 0.5, 0.5, get_width() - 1, get_height() - 1, _corner_radius);
|
||||
cairo_stroke (cr);
|
||||
|
@ -408,9 +408,9 @@ AudioTimeAxisView::update_control_names ()
|
||||
}
|
||||
|
||||
if (get_selected()) {
|
||||
controls_ebox.set_name (controls_base_selected_name);
|
||||
time_axis_frame.set_name (controls_base_selected_name);
|
||||
} else {
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
time_axis_frame.set_name (controls_base_unselected_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
|
||||
controls_base_selected_name = X_("AutomationTrackControlsBaseSelected");
|
||||
controls_base_unselected_name = X_("AutomationTrackControlsBase");
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
time_axis_frame.set_name (controls_base_unselected_name);
|
||||
|
||||
/* ask for notifications of any new RegionViews */
|
||||
if (show_regions) {
|
||||
|
@ -201,10 +201,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
gm.set_fader_name ("AudioBusFader");
|
||||
}
|
||||
|
||||
Gtk::VBox *mtrbox = manage(new Gtk::VBox());
|
||||
mtrbox->pack_start(gm.get_level_meter(), false, false, 2);
|
||||
top_hbox.pack_end(*mtrbox, false, false, 4);
|
||||
mtrbox->show();
|
||||
top_hbox.pack_end(gm.get_level_meter(), false, false, 4);
|
||||
|
||||
_route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context());
|
||||
_route->input()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
|
||||
|
@ -180,9 +180,12 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||
controls_ebox.show ();
|
||||
|
||||
time_axis_vbox.pack_start (controls_ebox, true, true, 0);
|
||||
time_axis_vbox.pack_end (*separator, false, false);
|
||||
// time_axis_vbox.pack_end (*separator, false, false);
|
||||
time_axis_vbox.show();
|
||||
|
||||
time_axis_frame.add(time_axis_vbox);
|
||||
time_axis_frame.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());
|
||||
@ -231,7 +234,7 @@ TimeAxisView::hide ()
|
||||
_canvas_display->hide ();
|
||||
|
||||
if (control_parent) {
|
||||
control_parent->remove (time_axis_vbox);
|
||||
control_parent->remove (time_axis_frame);
|
||||
control_parent = 0;
|
||||
}
|
||||
|
||||
@ -263,11 +266,11 @@ guint32
|
||||
TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
||||
{
|
||||
if (control_parent) {
|
||||
control_parent->reorder_child (time_axis_vbox, nth);
|
||||
control_parent->reorder_child (time_axis_frame, nth);
|
||||
} else {
|
||||
control_parent = parent;
|
||||
parent->pack_start (time_axis_vbox, false, false);
|
||||
parent->reorder_child (time_axis_vbox, nth);
|
||||
parent->pack_start (time_axis_frame, false, false);
|
||||
parent->reorder_child (time_axis_frame, nth);
|
||||
}
|
||||
|
||||
_order = nth;
|
||||
@ -525,7 +528,7 @@ TimeAxisView::set_height (uint32_t h)
|
||||
h = preset_height (HeightSmall);
|
||||
}
|
||||
|
||||
time_axis_vbox.property_height_request () = h;
|
||||
time_axis_frame.property_height_request () = h;
|
||||
height = h;
|
||||
|
||||
char buf[32];
|
||||
@ -768,13 +771,21 @@ TimeAxisView::set_selected (bool yn)
|
||||
Selectable::set_selected (yn);
|
||||
|
||||
if (_selected) {
|
||||
controls_ebox.set_name (controls_base_selected_name);
|
||||
time_axis_vbox.set_name (controls_base_selected_name);
|
||||
controls_vbox.set_name (controls_base_selected_name);
|
||||
time_axis_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
|
||||
time_axis_frame.set_name ("MixerStripSelectedFrame");
|
||||
|
||||
// time_axis_frame.set_name (controls_base_selected_name);
|
||||
// controls_ebox.set_name (controls_base_selected_name);
|
||||
// time_axis_vbox.set_name (controls_base_selected_name);
|
||||
// controls_vbox.set_name (controls_base_selected_name);
|
||||
} else {
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
time_axis_vbox.set_name (controls_base_unselected_name);
|
||||
controls_vbox.set_name (controls_base_unselected_name);
|
||||
time_axis_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
|
||||
time_axis_frame.set_name (controls_base_unselected_name);
|
||||
|
||||
// time_axis_frame.set_name (controls_base_unselected_name);
|
||||
// controls_ebox.set_name (controls_base_unselected_name);
|
||||
// time_axis_vbox.set_name (controls_base_unselected_name);
|
||||
// controls_vbox.set_name (controls_base_unselected_name);
|
||||
hide_selection ();
|
||||
|
||||
/* children will be set for the yn=true case. but when deselecting
|
||||
@ -786,6 +797,9 @@ TimeAxisView::set_selected (bool yn)
|
||||
(*i)->set_selected (false);
|
||||
}
|
||||
}
|
||||
|
||||
time_axis_frame.show();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -831,7 +845,8 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
||||
double x1;
|
||||
double x2;
|
||||
double y2;
|
||||
SelectionRect *rect;
|
||||
SelectionRect *rect; time_axis_frame.show();
|
||||
|
||||
|
||||
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
(*i)->show_selection (ts);
|
||||
|
@ -208,6 +208,7 @@ class TimeAxisView : public virtual AxisView
|
||||
Gtk::VBox controls_vbox;
|
||||
Gtk::VBox name_vbox;
|
||||
Gtk::VBox time_axis_vbox;
|
||||
Gtk::Frame time_axis_frame;
|
||||
Gtk::HBox name_hbox;
|
||||
Gtk::HBox top_hbox;
|
||||
Gtk::Label name_label;
|
||||
|
@ -205,7 +205,7 @@ TimeAxisViewItem::init (ArdourCanvas::Item* parent, double fpp, uint32_t base_co
|
||||
if (Config->get_show_name_highlight()) {
|
||||
frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT));
|
||||
} else {
|
||||
frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::BOTTOM));
|
||||
frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::LEFT|ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::BOTTOM|ArdourCanvas::Rectangle::TOP));
|
||||
}
|
||||
|
||||
if (_recregion) {
|
||||
|
Loading…
Reference in New Issue
Block a user