13
0

tweak panner drawing

git-svn-id: svn://localhost/ardour2/trunk@1420 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-02-03 20:43:36 +00:00
parent 249cb20c23
commit 68a690b403
3 changed files with 11 additions and 9 deletions

View File

@ -143,7 +143,7 @@ style "transport_base" = "medium_bold_text"
style "black_mackie_menu_bar"
{
font_name = "sans bold 9"
font_name = "sans bold 7"
fg[NORMAL] = { 1.0, 1.0, 1.0 }
bg[NORMAL] = { 0, 0, 0 }
}

View File

@ -55,23 +55,23 @@ PannerBar::expose (GdkEventExpose* ev)
points[0].x = (darea.get_width()/2 - triangle_size);
points[0].y = 0;
points[1].x = (darea.get_width()/2 + triangle_size) - 1;
points[1].x = (darea.get_width()/2 + triangle_size);
points[1].y = 0;
points[2].x = darea.get_width()/2 - 1;
points[2].x = darea.get_width()/2;
points[2].y = triangle_size - 1;
gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
// right
points[0].x = (darea.get_width() - triangle_size) - 1;
points[0].x = (darea.get_width() - triangle_size);
points[0].y = 0;
points[1].x = darea.get_width() - 1;
points[1].x = darea.get_width();
points[1].y = 0;
points[2].x = darea.get_width() - 1;
points[2].x = darea.get_width();
points[2].y = triangle_size;
gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);

View File

@ -267,14 +267,12 @@ BarController::expose (GdkEventExpose* event)
gint w, h;
double fract;
w = darea.get_width() - 2;
h = darea.get_height() - 2;
fract = ((adjustment.get_value() - adjustment.get_lower()) /
(adjustment.get_upper() - adjustment.get_lower()));
switch (_style) {
case Line:
w = darea.get_width() - 1;
h = darea.get_height();
x1 = (gint) floor (w * fract);
x2 = x1;
@ -304,6 +302,10 @@ BarController::expose (GdkEventExpose* event)
break;
case LeftToRight:
w = darea.get_width() - 2;
h = darea.get_height() - 2;
x1 = 0;
x2 = (gint) floor (w * fract);
y1 = 0;