mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
start of Blob-style for bar controller and use in panner GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@8133 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6b29e87fe4
commit
503d1b5306
4 changed files with 30 additions and 3 deletions
|
|
@ -244,9 +244,10 @@ BarController::mouse_control (double x, GdkWindow* window, double scaling)
|
|||
|
||||
delta = x - grab_x;
|
||||
grab_x = x;
|
||||
|
||||
|
||||
switch (_style) {
|
||||
case Line:
|
||||
case Blob:
|
||||
case LeftToRight:
|
||||
case CenterOut:
|
||||
fract = scaling * (delta / (darea.get_width() - 2));
|
||||
|
|
@ -302,6 +303,31 @@ BarController::expose (GdkEventExpose* /*event*/)
|
|||
win->draw_line (get_style()->get_fg_gc (get_state()), x1, 0, x1, h);
|
||||
break;
|
||||
|
||||
case Blob:
|
||||
w = darea.get_width() - 1;
|
||||
h = darea.get_height();
|
||||
x1 = (gint) floor (w * fract);
|
||||
x2 = min (w-2,h-2);
|
||||
|
||||
if (use_parent) {
|
||||
parent = get_parent();
|
||||
|
||||
if (parent) {
|
||||
win->draw_rectangle (parent->get_style()->get_fg_gc (parent->get_state()),
|
||||
true,
|
||||
0, 0, darea.get_width(), darea.get_height());
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
win->draw_rectangle (get_style()->get_bg_gc (get_state()),
|
||||
true,
|
||||
0, 0, darea.get_width() - ((darea.get_width()+1) % 2), darea.get_height());
|
||||
}
|
||||
|
||||
win->draw_arc (get_style()->get_fg_gc (get_state()), true, x1, ((h-2)/2)-1, x2, x2, 0, 360 * 64);
|
||||
break;
|
||||
|
||||
case CenterOut:
|
||||
w = darea.get_width();
|
||||
h = darea.get_height()-2;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class BarController : public Gtk::Frame
|
|||
LeftToRight,
|
||||
RightToLeft,
|
||||
Line,
|
||||
Blob,
|
||||
CenterOut,
|
||||
|
||||
TopToBottom,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue