NO-OP: clang-format
This commit is contained in:
parent
e764714157
commit
8b365e238e
|
@ -34,10 +34,10 @@
|
|||
#include "ardour/session.h"
|
||||
|
||||
#include "gtkmm2ext/colors.h"
|
||||
#include "gtkmm2ext/keyboard.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/keyboard.h"
|
||||
#include "gtkmm2ext/rgb_macros.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "widgets/tooltips.h"
|
||||
|
||||
|
@ -52,10 +52,11 @@ using namespace Gtk;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourWidgets;
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::min;
|
||||
|
||||
gboolean qt (gboolean, gint, gint, gboolean, Gtk::Tooltip*, gpointer)
|
||||
gboolean
|
||||
qt (gboolean, gint, gint, gboolean, Gtk::Tooltip*, gpointer)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -115,7 +116,6 @@ ShuttleInfoButton::on_button_press_event (GdkEventButton* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShuttleInfoButton::build_disp_context_menu ()
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ ShuttleInfoButton::build_disp_context_menu ()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* ****************************************************************************/
|
||||
|
||||
ShuttleControl::ShuttleControl ()
|
||||
: _controllable (new ShuttleControllable (*this))
|
||||
|
@ -166,12 +166,19 @@ ShuttleControl::ShuttleControl ()
|
|||
|
||||
shuttle_max_speed = Config->get_shuttle_max_speed ();
|
||||
|
||||
if (shuttle_max_speed >= Config->get_max_transport_speed()) { shuttle_max_speed = Config->get_max_transport_speed(); }
|
||||
else if (shuttle_max_speed >= 6.f) { shuttle_max_speed = 6.0f; }
|
||||
else if (shuttle_max_speed >= 4.f) { shuttle_max_speed = 4.0f; }
|
||||
else if (shuttle_max_speed >= 3.f) { shuttle_max_speed = 3.0f; }
|
||||
else if (shuttle_max_speed >= 2.f) { shuttle_max_speed = 2.0f; }
|
||||
else { shuttle_max_speed = 1.5f; }
|
||||
if (shuttle_max_speed >= Config->get_max_transport_speed ()) {
|
||||
shuttle_max_speed = Config->get_max_transport_speed ();
|
||||
} else if (shuttle_max_speed >= 6.f) {
|
||||
shuttle_max_speed = 6.0f;
|
||||
} else if (shuttle_max_speed >= 4.f) {
|
||||
shuttle_max_speed = 4.0f;
|
||||
} else if (shuttle_max_speed >= 3.f) {
|
||||
shuttle_max_speed = 3.0f;
|
||||
} else if (shuttle_max_speed >= 2.f) {
|
||||
shuttle_max_speed = 2.0f;
|
||||
} else {
|
||||
shuttle_max_speed = 1.5f;
|
||||
}
|
||||
|
||||
Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, _1), gui_context ());
|
||||
UIConfiguration::instance ().ColorsChanged.connect (sigc::mem_fun (*this, &ShuttleControl::set_colors));
|
||||
|
@ -179,7 +186,6 @@ ShuttleControl::ShuttleControl ()
|
|||
|
||||
set_tooltip (_vari_button, _("Varispeed: change the default playback and recording speed"));
|
||||
|
||||
// _vari_button.set_icon (ArdourIcon::RecButton);
|
||||
_vari_button.set_name ("vari button");
|
||||
_vari_button.set_text (_("Vari"));
|
||||
_vari_button.signal_clicked.connect (sigc::mem_fun (*this, &ShuttleControl::varispeed_button_clicked));
|
||||
|
@ -247,7 +253,6 @@ ShuttleControl::do_blink (bool onoff)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShuttleControl::set_session (Session* s)
|
||||
{
|
||||
|
@ -276,7 +281,7 @@ ShuttleControl::on_size_allocate (Gtk::Allocation& alloc)
|
|||
|
||||
CairoWidget::on_size_allocate (alloc);
|
||||
|
||||
//background
|
||||
/* background */
|
||||
pattern = cairo_pattern_create_linear (0, 0, 0, alloc.get_height ());
|
||||
uint32_t col = UIConfiguration::instance ().color ("shuttle");
|
||||
int r, b, g, a;
|
||||
|
@ -285,7 +290,7 @@ ShuttleControl::on_size_allocate (Gtk::Allocation& alloc)
|
|||
cairo_pattern_add_color_stop_rgb (pattern, 0.4, r / 255.0, g / 255.0, b / 255.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 1.0, r / 512.0, g / 512.0, b / 512.0);
|
||||
|
||||
//reflection
|
||||
/* reflection */
|
||||
shine_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, 10);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0, 1, 1, 1, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.2, 1, 1, 1, 0.4);
|
||||
|
@ -348,14 +353,12 @@ ShuttleControl::map_transport_state ()
|
|||
} else {
|
||||
snprintf (buf, sizeof (buf), "%s", _("Stop"));
|
||||
}
|
||||
_info_button.set_text(buf);
|
||||
|
||||
_info_button.set_text (buf);
|
||||
|
||||
if ((fabsf (speed - last_speed_displayed) < 0.005f) // dead-zone
|
||||
&& !(speed == 1.f && last_speed_displayed != 1.f)
|
||||
&& !( speed == 0.f && last_speed_displayed != 0.f)
|
||||
)
|
||||
{
|
||||
&& !(speed == 0.f && last_speed_displayed != 0.f)) {
|
||||
return; // nothing to see here, move along.
|
||||
}
|
||||
|
||||
|
@ -502,7 +505,6 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev)
|
|||
case 3:
|
||||
default:
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -726,7 +728,6 @@ ShuttleControl::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangl
|
|||
}
|
||||
cairo_fill (cr);
|
||||
|
||||
|
||||
last_speed_displayed = speed;
|
||||
|
||||
#if 0
|
||||
|
@ -773,7 +774,6 @@ ShuttleControl::parameter_changed (std::string p)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ShuttleControl::on_enter_notify_event (GdkEventCrossing* ev)
|
||||
{
|
||||
|
|
|
@ -65,10 +65,14 @@ public:
|
|||
|
||||
void map_transport_state ();
|
||||
void set_shuttle_fract (double, bool zero_ok = false);
|
||||
double get_shuttle_fract () const { return shuttle_fract; }
|
||||
double get_shuttle_fract () const
|
||||
{
|
||||
return shuttle_fract;
|
||||
}
|
||||
void set_session (ARDOUR::Session*);
|
||||
|
||||
void do_blink (bool);
|
||||
void set_colors ();
|
||||
|
||||
struct ShuttleControllable : public PBD::Controllable {
|
||||
ShuttleControllable (ShuttleControl&);
|
||||
|
@ -81,11 +85,20 @@ public:
|
|||
ShuttleControl& sc;
|
||||
};
|
||||
|
||||
boost::shared_ptr<ShuttleControllable> controllable() const { return _controllable; }
|
||||
void set_colors ();
|
||||
boost::shared_ptr<ShuttleControllable> controllable () const
|
||||
{
|
||||
return _controllable;
|
||||
}
|
||||
|
||||
ArdourWidgets::ArdourButton* info_button () { return &_info_button; }
|
||||
ArdourWidgets::ArdourButton* vari_button () { return &_vari_button; }
|
||||
ArdourWidgets::ArdourButton* info_button ()
|
||||
{
|
||||
return &_info_button;
|
||||
}
|
||||
|
||||
ArdourWidgets::ArdourButton* vari_button ()
|
||||
{
|
||||
return &_vari_button;
|
||||
}
|
||||
|
||||
public:
|
||||
static int speed_as_semitones (float, bool&);
|
||||
|
@ -97,7 +110,6 @@ public:
|
|||
static int speed_as_cents (float, bool&);
|
||||
static float cents_as_speed (int, bool);
|
||||
|
||||
|
||||
protected:
|
||||
bool _hovering;
|
||||
float shuttle_max_speed;
|
||||
|
|
Loading…
Reference in New Issue
Block a user