mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
change CairoWidget API to be a more logical/intuitive for setting widget state, to differentiate between active state and visual state (prelight, insensitive etc)
git-svn-id: svn://localhost/ardour2/branches/3.0@10314 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
24765e8459
commit
892f3c361e
11 changed files with 80 additions and 90 deletions
|
|
@ -26,8 +26,6 @@
|
||||||
#@color arm #F33
|
#@color arm #F33
|
||||||
#@color solo #A8F730
|
#@color solo #A8F730
|
||||||
#@color midi_channel_selector #A8F730
|
#@color midi_channel_selector #A8F730
|
||||||
#@color isolate #B9ECF2
|
|
||||||
#@color solo_lock #3593DA
|
|
||||||
#@color mute #FFFA87
|
#@color mute #FFFA87
|
||||||
#@color mono #DEC
|
#@color mono #DEC
|
||||||
#@color monitor #FFAB34
|
#@color monitor #FFAB34
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@
|
||||||
#@color arm #F33
|
#@color arm #F33
|
||||||
#@color solo #A8F730
|
#@color solo #A8F730
|
||||||
#@color midi_channel_selector #A8F730
|
#@color midi_channel_selector #A8F730
|
||||||
#@color isolate #B9ECF2
|
|
||||||
#@color solo_lock #3593DA
|
|
||||||
#@color mute #FFFA87
|
#@color mute #FFFA87
|
||||||
#@color mono #DEC
|
#@color mono #DEC
|
||||||
#@color monitor #7596DE
|
#@color monitor #7596DE
|
||||||
|
|
|
||||||
|
|
@ -400,4 +400,3 @@ widget "*MeasureLatencyButton" style:highest "default_toggle_button"
|
||||||
widget "*processor prefader" style:highest "processor_prefader"
|
widget "*processor prefader" style:highest "processor_prefader"
|
||||||
widget "*processor fader" style:highest "processor_fader"
|
widget "*processor fader" style:highest "processor_fader"
|
||||||
widget "*processor postfader" style:highest "processor_postfader"
|
widget "*processor postfader" style:highest "processor_postfader"
|
||||||
widget "*ProcessorFrameActiveSend" style:highest "processor_frame_active_send"
|
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ using namespace Gtk;
|
||||||
using namespace Glib;
|
using namespace Glib;
|
||||||
using std::max;
|
using std::max;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::cerr;
|
|
||||||
using std::endl;
|
|
||||||
|
|
||||||
ArdourButton::ArdourButton()
|
ArdourButton::ArdourButton()
|
||||||
: _text_width (0)
|
: _text_width (0)
|
||||||
|
|
@ -54,6 +52,7 @@ ArdourButton::ArdourButton()
|
||||||
|
|
||||||
{
|
{
|
||||||
ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
|
ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
|
||||||
|
StateChanged.connect (sigc::mem_fun (*this, &ArdourButton::state_handler));
|
||||||
}
|
}
|
||||||
|
|
||||||
ArdourButton::~ArdourButton()
|
ArdourButton::~ArdourButton()
|
||||||
|
|
@ -160,9 +159,8 @@ ArdourButton::render (cairo_t* cr)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ArdourButton::set_state (CairoWidget::State s, bool yn)
|
ArdourButton::state_handler ()
|
||||||
{
|
{
|
||||||
CairoWidget::set_state (s, yn);
|
|
||||||
set_colors ();
|
set_colors ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -222,7 +220,7 @@ ArdourButton::set_colors ()
|
||||||
}
|
}
|
||||||
|
|
||||||
edge_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _height);
|
edge_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _height);
|
||||||
if (_state & CairoWidget::Selected) {
|
if (visual_state() & CairoWidget::Selected) {
|
||||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 border start selected", get_name()));
|
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 border start selected", get_name()));
|
||||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 border end selected", get_name()));
|
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 border end selected", get_name()));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -242,10 +240,11 @@ ArdourButton::set_colors ()
|
||||||
}
|
}
|
||||||
|
|
||||||
fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _height);
|
fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _height);
|
||||||
if (_state & Mid) {
|
|
||||||
|
if (active_state() == Mid) {
|
||||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill start mid", get_name()));
|
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill start mid", get_name()));
|
||||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill end mid", get_name()));
|
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill end mid", get_name()));
|
||||||
} else if (_state & Active) {
|
} else if (active_state() == Active) {
|
||||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill start active", get_name()));
|
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill start active", get_name()));
|
||||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill end active", get_name()));
|
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 fill end active", get_name()));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -270,14 +269,14 @@ ArdourButton::set_colors ()
|
||||||
}
|
}
|
||||||
|
|
||||||
reflection_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _diameter/2-3);
|
reflection_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, _diameter/2-3);
|
||||||
cairo_pattern_add_color_stop_rgba (reflection_pattern, 0, 1,1,1, (_state & Active) ? 0.4 : 0.2);
|
cairo_pattern_add_color_stop_rgba (reflection_pattern, 0, 1,1,1, active_state() ? 0.4 : 0.2);
|
||||||
cairo_pattern_add_color_stop_rgba (reflection_pattern, 1, 1,1,1, 0.0);
|
cairo_pattern_add_color_stop_rgba (reflection_pattern, 1, 1,1,1, 0.0);
|
||||||
|
|
||||||
/* text and LED colors depend on Active/Normal/Mid */
|
/* text and LED colors depend on Active/Normal/Mid */
|
||||||
if (_state & Active) {
|
if (active_state() == Active) {
|
||||||
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 text active", get_name()));
|
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 text active", get_name()));
|
||||||
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 led active", get_name()));
|
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 led active", get_name()));
|
||||||
} else if (_state & Mid) {
|
} else if (active_state() == Mid) {
|
||||||
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 text mid", get_name()));
|
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 text mid", get_name()));
|
||||||
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 led active", get_name()));
|
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 led active", get_name()));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,6 @@ class ArdourButton : public CairoWidget, Gtk::Activatable
|
||||||
|
|
||||||
sigc::signal<void> signal_clicked;
|
sigc::signal<void> signal_clicked;
|
||||||
|
|
||||||
void set_state (State s, bool);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void render (cairo_t *);
|
void render (cairo_t *);
|
||||||
void on_size_request (Gtk::Requisition* req);
|
void on_size_request (Gtk::Requisition* req);
|
||||||
|
|
@ -78,6 +76,7 @@ class ArdourButton : public CairoWidget, Gtk::Activatable
|
||||||
|
|
||||||
void set_colors ();
|
void set_colors ();
|
||||||
void color_handler ();
|
void color_handler ();
|
||||||
|
void state_handler ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk2_ardour_ardour_button_h__ */
|
#endif /* __gtk2_ardour_ardour_button_h__ */
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
CairoWidget::CairoWidget ()
|
CairoWidget::CairoWidget ()
|
||||||
: _width (1)
|
: _width (1)
|
||||||
, _height (1)
|
, _height (1)
|
||||||
, _state (CairoWidget::State (0))
|
, _active_state (CairoWidget::ActiveState (0))
|
||||||
|
, _visual_state (CairoWidget::VisualState (0))
|
||||||
, _dirty (true)
|
, _dirty (true)
|
||||||
, _pixmap (0)
|
, _pixmap (0)
|
||||||
|
|
||||||
|
|
@ -131,17 +132,19 @@ CairoWidget::get_parent_bg ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CairoWidget::set_state (CairoWidget::State s, bool yn)
|
CairoWidget::set_active_state (CairoWidget::ActiveState s)
|
||||||
{
|
{
|
||||||
if (yn) {
|
if (_active_state != s) {
|
||||||
if (!(_state & s)) {
|
_active_state = s;
|
||||||
_state = CairoWidget::State (_state|s);
|
|
||||||
StateChanged ();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (_state & s) {
|
|
||||||
_state = CairoWidget::State (_state & ~s);
|
|
||||||
StateChanged ();
|
StateChanged ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CairoWidget::set_visual_state (CairoWidget::VisualState s)
|
||||||
|
{
|
||||||
|
if (_visual_state != s) {
|
||||||
|
_visual_state = s;
|
||||||
|
StateChanged ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,21 +35,29 @@ public:
|
||||||
|
|
||||||
void set_dirty ();
|
void set_dirty ();
|
||||||
|
|
||||||
/* widget states: unlike GTK, these OR-together so that
|
/* widget states: unlike GTK, visual states like "Selected" or "Prelight"
|
||||||
a widget can be both Active *and* Selected, rather than
|
are orthogonal to active states.
|
||||||
each one being orthogonal.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum State {
|
enum ActiveState {
|
||||||
Active = 0x1,
|
Active = 1,
|
||||||
Mid = 0x2,
|
Mid,
|
||||||
Selected = 0x4,
|
|
||||||
Prelight = 0x8,
|
|
||||||
Insensitive = 0x10,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
State state() const { return _state; }
|
enum VisualState {
|
||||||
virtual void set_state (State, bool);
|
/* these can be OR-ed together */
|
||||||
|
Selected = 0x1,
|
||||||
|
Prelight = 0x2,
|
||||||
|
Insensitive = 0x4,
|
||||||
|
};
|
||||||
|
|
||||||
|
ActiveState active_state() const { return _active_state; }
|
||||||
|
VisualState visual_state() const { return _visual_state; }
|
||||||
|
virtual void set_active_state (ActiveState);
|
||||||
|
virtual void set_visual_state (VisualState);
|
||||||
|
virtual void unset_active_state () { set_active_state (ActiveState (0)); }
|
||||||
|
virtual void unset_visual_state () { set_visual_state (VisualState (0)); }
|
||||||
|
|
||||||
sigc::signal<void> StateChanged;
|
sigc::signal<void> StateChanged;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -61,7 +69,8 @@ protected:
|
||||||
|
|
||||||
int _width; ///< pixmap width
|
int _width; ///< pixmap width
|
||||||
int _height; ///< pixmap height
|
int _height; ///< pixmap height
|
||||||
State _state;
|
ActiveState _active_state;
|
||||||
|
VisualState _visual_state;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _dirty; ///< true if the pixmap requires re-rendering
|
bool _dirty; ///< true if the pixmap requires re-rendering
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,7 @@ using namespace Gtk;
|
||||||
using namespace Glib;
|
using namespace Glib;
|
||||||
|
|
||||||
LED::LED()
|
LED::LED()
|
||||||
: _visual_state (0)
|
: _diameter (0.0)
|
||||||
, _active (false)
|
|
||||||
, _diameter (0.0)
|
|
||||||
, _fixed_diameter (false)
|
, _fixed_diameter (false)
|
||||||
, _red (0.0)
|
, _red (0.0)
|
||||||
, _green (1.0)
|
, _green (1.0)
|
||||||
|
|
@ -94,14 +92,14 @@ LED::render (cairo_t* cr)
|
||||||
cairo_fill(cr);
|
cairo_fill(cr);
|
||||||
|
|
||||||
//knob color
|
//knob color
|
||||||
cairo_set_source_rgba (cr, _red, _green, _blue, _active ? 0.8 : 0.2);
|
cairo_set_source_rgba (cr, _red, _green, _blue, (active_state() == Active) ? 0.8 : 0.2);
|
||||||
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
||||||
cairo_fill(cr);
|
cairo_fill(cr);
|
||||||
|
|
||||||
//reflection
|
//reflection
|
||||||
cairo_scale(cr, 0.7, 0.7);
|
cairo_scale(cr, 0.7, 0.7);
|
||||||
cairo_pattern_t *pat2 = cairo_pattern_create_linear (0.0, 0.0, 0.0, _diameter/2-3);
|
cairo_pattern_t *pat2 = cairo_pattern_create_linear (0.0, 0.0, 0.0, _diameter/2-3);
|
||||||
cairo_pattern_add_color_stop_rgba (pat2, 0, 1,1,1, _active ? 0.4 : 0.2);
|
cairo_pattern_add_color_stop_rgba (pat2, 0, 1,1,1, active_state() ? 0.4 : 0.2);
|
||||||
cairo_pattern_add_color_stop_rgba (pat2, 1, 1,1,1, 0.0);
|
cairo_pattern_add_color_stop_rgba (pat2, 1, 1,1,1, 0.0);
|
||||||
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
||||||
cairo_set_source (cr, pat2);
|
cairo_set_source (cr, pat2);
|
||||||
|
|
@ -111,24 +109,6 @@ LED::render (cairo_t* cr)
|
||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LED::set_active (bool yn)
|
|
||||||
{
|
|
||||||
_active = yn;
|
|
||||||
_visual_state = (yn ? 1 : 0);
|
|
||||||
set_colors_from_style ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LED::set_visual_state (int32_t s)
|
|
||||||
{
|
|
||||||
if (s != _visual_state) {
|
|
||||||
|
|
||||||
_visual_state = s;
|
|
||||||
set_colors_from_style ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
LED::set_diameter (float d)
|
LED::set_diameter (float d)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,6 @@ class LED : public CairoWidget
|
||||||
LED ();
|
LED ();
|
||||||
virtual ~LED ();
|
virtual ~LED ();
|
||||||
|
|
||||||
void set_active (bool yn);
|
|
||||||
bool active () const { return _active; }
|
|
||||||
void set_visual_state (int32_t s);
|
|
||||||
int32_t visual_state() const { return _visual_state; }
|
|
||||||
void set_diameter (float);
|
void set_diameter (float);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -42,8 +38,6 @@ class LED : public CairoWidget
|
||||||
void on_realize ();
|
void on_realize ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t _visual_state;
|
|
||||||
bool _active;
|
|
||||||
float _diameter;
|
float _diameter;
|
||||||
bool _fixed_diameter;
|
bool _fixed_diameter;
|
||||||
float _red;
|
float _red;
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,9 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w)
|
||||||
_vbox.pack_start (_button, true, true);
|
_vbox.pack_start (_button, true, true);
|
||||||
_vbox.show ();
|
_vbox.show ();
|
||||||
|
|
||||||
_button.set_state (CairoWidget::Active, _processor->active());
|
if (_processor->active()) {
|
||||||
|
_button.set_active_state (CairoWidget::Active);
|
||||||
|
}
|
||||||
_button.set_diameter (3);
|
_button.set_diameter (3);
|
||||||
_button.signal_clicked.connect (sigc::mem_fun (*this, &ProcessorEntry::led_clicked));
|
_button.signal_clicked.connect (sigc::mem_fun (*this, &ProcessorEntry::led_clicked));
|
||||||
_button.set_text (name());
|
_button.set_text (name());
|
||||||
|
|
@ -149,17 +151,18 @@ ProcessorEntry::set_visual_state (Gtk::StateType t)
|
||||||
|
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case Gtk::STATE_ACTIVE:
|
case Gtk::STATE_ACTIVE:
|
||||||
_button.set_state (CairoWidget::Active, true);
|
_button.set_active_state (CairoWidget::Active);
|
||||||
|
_button.unset_visual_state ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Gtk::STATE_SELECTED:
|
case Gtk::STATE_SELECTED:
|
||||||
_button.set_state (CairoWidget::Selected, true);
|
_button.set_visual_state (CairoWidget::Selected);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Gtk::STATE_NORMAL:
|
case Gtk::STATE_NORMAL:
|
||||||
default:
|
default:
|
||||||
_button.set_state (CairoWidget::Selected, false);
|
_button.unset_visual_state ();
|
||||||
_button.set_state (CairoWidget::Active, false);
|
_button.unset_active_state ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -208,7 +211,11 @@ ProcessorEntry::led_clicked()
|
||||||
void
|
void
|
||||||
ProcessorEntry::processor_active_changed ()
|
ProcessorEntry::processor_active_changed ()
|
||||||
{
|
{
|
||||||
_button.set_state (CairoWidget::Active, _processor->active());
|
if (_processor->active()) {
|
||||||
|
_button.set_active_state (CairoWidget::Active);
|
||||||
|
} else {
|
||||||
|
_button.unset_active_state ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -608,26 +608,22 @@ RouteUI::update_monitoring_display ()
|
||||||
MonitorState ms = t->monitoring_state();
|
MonitorState ms = t->monitoring_state();
|
||||||
|
|
||||||
if (t->monitoring_choice() & MonitorInput) {
|
if (t->monitoring_choice() & MonitorInput) {
|
||||||
monitor_input_button->set_state (CairoWidget::Active, true);
|
monitor_input_button->set_active_state (CairoWidget::Active);
|
||||||
monitor_input_button->set_state (CairoWidget::Mid, false);
|
|
||||||
} else {
|
} else {
|
||||||
if (ms & MonitoringInput) {
|
if (ms & MonitoringInput) {
|
||||||
monitor_input_button->set_state (CairoWidget::Mid, true);
|
monitor_input_button->set_active_state (CairoWidget::Mid);
|
||||||
monitor_input_button->set_state (CairoWidget::Active, false);
|
|
||||||
} else {
|
} else {
|
||||||
monitor_input_button->set_state (CairoWidget::State (CairoWidget::Active|CairoWidget::Mid), false);
|
monitor_input_button->unset_active_state ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->monitoring_choice() & MonitorDisk) {
|
if (t->monitoring_choice() & MonitorDisk) {
|
||||||
monitor_disk_button->set_state (CairoWidget::Active, true);
|
monitor_disk_button->set_active_state (CairoWidget::Active);
|
||||||
monitor_disk_button->set_state (CairoWidget::Mid, false);
|
|
||||||
} else {
|
} else {
|
||||||
if (ms & MonitoringDisk) {
|
if (ms & MonitoringDisk) {
|
||||||
monitor_disk_button->set_state (CairoWidget::Mid, true);
|
monitor_disk_button->set_active_state (CairoWidget::Mid);
|
||||||
monitor_disk_button->set_state (CairoWidget::Active, false);
|
|
||||||
} else {
|
} else {
|
||||||
monitor_disk_button->set_state (CairoWidget::State (CairoWidget::Active|CairoWidget::Mid), false);
|
monitor_disk_button->unset_active_state ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1066,11 +1062,19 @@ RouteUI::update_solo_display ()
|
||||||
set_button_names ();
|
set_button_names ();
|
||||||
|
|
||||||
if (solo_isolated_led) {
|
if (solo_isolated_led) {
|
||||||
solo_isolated_led->set_state (CairoWidget::Active, _route->solo_isolated());
|
if (_route->solo_isolated()) {
|
||||||
|
solo_isolated_led->set_active_state (CairoWidget::Active);
|
||||||
|
} else {
|
||||||
|
solo_isolated_led->unset_active_state ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (solo_safe_led) {
|
if (solo_safe_led) {
|
||||||
solo_safe_led->set_state (CairoWidget::Active, _route->solo_safe());
|
if (_route->solo_safe()) {
|
||||||
|
solo_safe_led->set_active_state (CairoWidget::Active);
|
||||||
|
} else {
|
||||||
|
solo_safe_led->unset_active_state ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
solo_button->set_visual_state (solo_visual_state (_route));
|
solo_button->set_visual_state (solo_visual_state (_route));
|
||||||
|
|
@ -1340,7 +1344,7 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool view = (solo_isolated_led->state() & (CairoWidget::Active|CairoWidget::Mid));
|
bool view = solo_isolated_led->active_state();
|
||||||
bool model = _route->solo_isolated();
|
bool model = _route->solo_isolated();
|
||||||
|
|
||||||
/* called BEFORE the view has changed */
|
/* called BEFORE the view has changed */
|
||||||
|
|
@ -1371,7 +1375,7 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
||||||
bool
|
bool
|
||||||
RouteUI::solo_safe_button_release (GdkEventButton*)
|
RouteUI::solo_safe_button_release (GdkEventButton*)
|
||||||
{
|
{
|
||||||
_route->set_solo_safe (!(solo_safe_led->state() & (CairoWidget::Active|CairoWidget::Mid)), this);
|
_route->set_solo_safe (!solo_safe_led->active_state(), this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue