mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Indicate unlinked send-panners in pan-widget #8024
This commit is contained in:
parent
37e6a701bd
commit
777f1ea3be
6 changed files with 39 additions and 22 deletions
|
|
@ -147,8 +147,8 @@ MonoPanner::on_expose_event (GdkEventExpose*)
|
||||||
o = colors.outline;
|
o = colors.outline;
|
||||||
f = colors.fill;
|
f = colors.fill;
|
||||||
t = colors.text;
|
t = colors.text;
|
||||||
b = colors.background;
|
b = _send_mode ? colors.send_bg : colors.background;
|
||||||
pf = colors.pos_fill;
|
pf = (_send_mode && !_panner_shell->is_linked_to_route()) ? colors.send_pan : colors.pos_fill;
|
||||||
po = colors.pos_outline;
|
po = colors.pos_outline;
|
||||||
|
|
||||||
if (_panner_shell->bypassed()) {
|
if (_panner_shell->bypassed()) {
|
||||||
|
|
@ -160,9 +160,6 @@ MonoPanner::on_expose_event (GdkEventExpose*)
|
||||||
t = 0x606060ff;
|
t = 0x606060ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_send_mode) {
|
|
||||||
b = UIConfiguration::instance().color ("send bg");
|
|
||||||
}
|
|
||||||
/* background */
|
/* background */
|
||||||
context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
|
context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
|
||||||
context->rectangle (0, 0, width, height);
|
context->rectangle (0, 0, width, height);
|
||||||
|
|
@ -494,6 +491,8 @@ MonoPanner::set_colors ()
|
||||||
colors.background = UIConfiguration::instance().color ("mono panner bg");
|
colors.background = UIConfiguration::instance().color ("mono panner bg");
|
||||||
colors.pos_outline = UIConfiguration::instance().color ("mono panner position outline");
|
colors.pos_outline = UIConfiguration::instance().color ("mono panner position outline");
|
||||||
colors.pos_fill = UIConfiguration::instance().color_mod ("mono panner position fill", "mono panner position fill");
|
colors.pos_fill = UIConfiguration::instance().color_mod ("mono panner position fill", "mono panner position fill");
|
||||||
|
colors.send_bg = UIConfiguration::instance().color ("send bg");
|
||||||
|
colors.send_pan = UIConfiguration::instance().color ("send pan");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,8 @@ private:
|
||||||
uint32_t background;
|
uint32_t background;
|
||||||
uint32_t pos_outline;
|
uint32_t pos_outline;
|
||||||
uint32_t pos_fill;
|
uint32_t pos_fill;
|
||||||
|
uint32_t send_bg;
|
||||||
|
uint32_t send_pan;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool _dragging;
|
bool _dragging;
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@ Panner2d::set_colors ()
|
||||||
colors.signal_fill = 0x4884a9bf; // 0.282, 0.517, 0.662, 0.75
|
colors.signal_fill = 0x4884a9bf; // 0.282, 0.517, 0.662, 0.75
|
||||||
colors.speaker_fill = 0x4884a9ff; // 0.282, 0.517, 0.662, 1.0
|
colors.speaker_fill = 0x4884a9ff; // 0.282, 0.517, 0.662, 1.0
|
||||||
colors.text = 0x84c5e1e6; // 0.517, 0.772, 0.882, 0.9
|
colors.text = 0x84c5e1e6; // 0.517, 0.772, 0.882, 0.9
|
||||||
|
|
||||||
|
colors.send_bg = UIConfiguration::instance().color ("send bg");
|
||||||
|
colors.send_pan = UIConfiguration::instance().color ("send pan");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -475,10 +478,7 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
||||||
|
|
||||||
cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
|
cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
|
||||||
|
|
||||||
uint32_t bg = colors.background;
|
uint32_t bg = _send_mode ? colors.send_bg : colors.background;
|
||||||
if (_send_mode) {
|
|
||||||
bg = UIConfiguration::instance().color ("send bg");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!panner_shell->bypassed()) {
|
if (!panner_shell->bypassed()) {
|
||||||
CSSRGBA(bg);
|
CSSRGBA(bg);
|
||||||
|
|
@ -598,7 +598,11 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
||||||
|
|
||||||
cairo_new_path (cr);
|
cairo_new_path (cr);
|
||||||
cairo_arc (cr, c.x, c.y, arc_radius, 0, 2.0 * M_PI);
|
cairo_arc (cr, c.x, c.y, arc_radius, 0, 2.0 * M_PI);
|
||||||
|
if (_send_mode && !panner_shell->is_linked_to_route()) {
|
||||||
|
CSSRGBA(colors.send_pan);
|
||||||
|
} else {
|
||||||
CSSRGBA(colors.signal_fill);
|
CSSRGBA(colors.signal_fill);
|
||||||
|
}
|
||||||
cairo_fill_preserve (cr);
|
cairo_fill_preserve (cr);
|
||||||
CSSRGBA(colors.signal_outline);
|
CSSRGBA(colors.signal_outline);
|
||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,8 @@ class Panner2d : public Gtk::DrawingArea
|
||||||
uint32_t signal_fill;
|
uint32_t signal_fill;
|
||||||
uint32_t speaker_fill;
|
uint32_t speaker_fill;
|
||||||
uint32_t text;
|
uint32_t text;
|
||||||
|
uint32_t send_bg;
|
||||||
|
uint32_t send_pan;
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorScheme colors;
|
static ColorScheme colors;
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,9 @@ using namespace ARDOUR_UI_UTILS;
|
||||||
using PBD::Controllable;
|
using PBD::Controllable;
|
||||||
|
|
||||||
StereoPanner::ColorScheme StereoPanner::colors[3];
|
StereoPanner::ColorScheme StereoPanner::colors[3];
|
||||||
|
|
||||||
|
uint32_t StereoPanner::colors_send_bg;
|
||||||
|
uint32_t StereoPanner::colors_send_pan;
|
||||||
bool StereoPanner::have_colors = false;
|
bool StereoPanner::have_colors = false;
|
||||||
|
|
||||||
Pango::AttrList StereoPanner::panner_font_attributes;
|
Pango::AttrList StereoPanner::panner_font_attributes;
|
||||||
|
|
@ -174,6 +177,10 @@ StereoPanner::on_expose_event (GdkEventExpose*)
|
||||||
b = colors[state].background;
|
b = colors[state].background;
|
||||||
r = colors[state].rule;
|
r = colors[state].rule;
|
||||||
|
|
||||||
|
if (_send_mode) {
|
||||||
|
b = colors_send_bg;
|
||||||
|
}
|
||||||
|
|
||||||
if (_panner_shell->bypassed()) {
|
if (_panner_shell->bypassed()) {
|
||||||
b = 0x20202040;
|
b = 0x20202040;
|
||||||
f = 0x404040ff;
|
f = 0x404040ff;
|
||||||
|
|
@ -182,12 +189,6 @@ StereoPanner::on_expose_event (GdkEventExpose*)
|
||||||
r = 0x606060ff;
|
r = 0x606060ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_send_mode) {
|
|
||||||
b = UIConfiguration::instance().color ("send bg");
|
|
||||||
// b = rgba_from_style("SendStripBase",
|
|
||||||
// UINT_RGBA_R(b), UINT_RGBA_G(b), UINT_RGBA_B(b), 255,
|
|
||||||
// "fg");
|
|
||||||
}
|
|
||||||
/* background */
|
/* background */
|
||||||
|
|
||||||
context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
|
context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
|
||||||
|
|
@ -292,6 +293,10 @@ StereoPanner::on_expose_event (GdkEventExpose*)
|
||||||
context->rel_line_to (0.0, -pos_box_size); /* upper left */
|
context->rel_line_to (0.0, -pos_box_size); /* upper left */
|
||||||
context->close_path ();
|
context->close_path ();
|
||||||
|
|
||||||
|
if (_send_mode && !_panner_shell->is_linked_to_route()) {
|
||||||
|
f = colors_send_pan;
|
||||||
|
}
|
||||||
|
|
||||||
context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
|
context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
|
||||||
context->stroke_preserve ();
|
context->stroke_preserve ();
|
||||||
context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
|
context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
|
||||||
|
|
@ -692,6 +697,9 @@ StereoPanner::set_colors ()
|
||||||
colors[Inverted].text = UIConfiguration::instance().color ("stereo panner inverted text");
|
colors[Inverted].text = UIConfiguration::instance().color ("stereo panner inverted text");
|
||||||
colors[Inverted].background = UIConfiguration::instance().color ("stereo panner inverted bg");
|
colors[Inverted].background = UIConfiguration::instance().color ("stereo panner inverted bg");
|
||||||
colors[Inverted].rule = UIConfiguration::instance().color ("stereo panner rule");
|
colors[Inverted].rule = UIConfiguration::instance().color ("stereo panner rule");
|
||||||
|
|
||||||
|
colors_send_bg = UIConfiguration::instance().color ("send bg");
|
||||||
|
colors_send_pan = UIConfiguration::instance().color ("send pan");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,8 @@ private:
|
||||||
static bool have_font;
|
static bool have_font;
|
||||||
|
|
||||||
static ColorScheme colors[3];
|
static ColorScheme colors[3];
|
||||||
|
static uint32_t colors_send_bg;
|
||||||
|
static uint32_t colors_send_pan;
|
||||||
static void set_colors ();
|
static void set_colors ();
|
||||||
static bool have_colors;
|
static bool have_colors;
|
||||||
void color_handler ();
|
void color_handler ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue