summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-31 20:09:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-31 20:09:41 +0000
commit209aeb85ef0a8ca6bf796acfd66ab7f9b1b8f0e4 (patch)
tree094451a072858d4eea91ce893421fe13038abf1e /gtk2_ardour
parent1987df571c861e89fa96dd1622bdc9908d0d768d (diff)
search lib64 for LADSPA plugins, and fix control point box size:track height relationship
git-svn-id: svn://localhost/ardour2/trunk@1040 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/automation_line.cc38
-rw-r--r--gtk2_ardour/automation_line.h4
2 files changed, 19 insertions, 23 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index f52b2dcf42..f81cd565c6 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -271,14 +271,6 @@ AutomationLine::queue_reset ()
}
void
-AutomationLine::set_point_size (double sz)
-{
- for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- (*i)->set_size (sz);
- }
-}
-
-void
AutomationLine::show ()
{
line->show();
@@ -302,18 +294,27 @@ AutomationLine::hide ()
_visible = false;
}
+uint32_t
+AutomationLine::control_point_box_size ()
+{
+ if (_height > TimeAxisView::hLarger) {
+ return 8.0;
+ } else if (_height > (guint32) TimeAxisView::hNormal) {
+ return 6.0;
+ }
+ return 4.0;
+}
+
void
AutomationLine::set_height (guint32 h)
{
if (h != _height) {
_height = h;
- if (_height > (guint32) TimeAxisView::Larger) {
- set_point_size (8.0);
- } else if (_height > (guint32) TimeAxisView::Normal) {
- set_point_size (6.0);
- } else {
- set_point_size (4.0);
+ uint32_t bsz = control_point_box_size();
+
+ for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
+ (*i)->set_size (bsz);
}
reset ();
@@ -700,13 +701,8 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
slope[n] = ydelta/xdelta;
}
- if (_height > (guint32) TimeAxisView::Larger) {
- box_size = 8.0;
- } else if (_height > (guint32) TimeAxisView::Normal) {
- box_size = 6.0;
- } else {
- box_size = 4.0;
- }
+ box_size = control_point_box_size ();
+
/* read all points and decide which ones to show as control points */
view_index = 0;
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 0567ffaa56..95d7164e3c 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -146,8 +146,6 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
void show_selection();
void hide_selection ();
- void set_point_size (double size);
-
virtual string get_verbose_cursor_string (float);
virtual void view_to_model_y (double&) = 0;
virtual void model_to_view_y (double&) = 0;
@@ -219,6 +217,8 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
void reset_line_coords (ControlPoint&);
void update_line ();
+ uint32_t control_point_box_size ();
+
struct ModelRepresentation {
ARDOUR::AutomationList::iterator start;
ARDOUR::AutomationList::iterator end;