13
0

Task Force Viking: operation green line

This commit is contained in:
Robin Gareus 2013-07-08 17:55:29 +02:00
parent 7121e19437
commit 40bc6f5b83
2 changed files with 52 additions and 16 deletions

View File

@ -72,9 +72,9 @@ style "gain_fader"
bg[ACTIVE] = shade (0.705, @@COLPREFIX@_bg)
bg[INSENSITIVE] = shade (0.705, @@COLPREFIX@_bg)
fg[INSENSITIVE] = { 0.525, 0.521, 0.568 }
fg[NORMAL] = { 0.525, 0.521, 0.568 }
fg[ACTIVE] = { 0.525, 0.521, 0.568 }
fg[INSENSITIVE] = shade(1.4, @@COLPREFIX@_bg)
fg[NORMAL] = shade(1.4, @@COLPREFIX@_bg)
fg[ACTIVE] = shade(1.4, @@COLPREFIX@_bg)
}
#MSR and related buttons

View File

@ -264,21 +264,57 @@ PixFader::on_expose_event (GdkEventExpose* ev)
/* draw the unity-position line if it's not at either end*/
if (unity_loc > 0) {
if ( _orien == VERT) {
if (unity_loc < h ) {
context->set_line_width (1);
context->set_source_rgb (0.0, 1.0, 0.0);
context->move_to (1, unity_loc);
context->line_to (girth - 2.0, unity_loc);
context->set_line_width (1);
if (girth <= 10) { // Line
context->set_source_rgb (0.0, 1.0, 0.0);
if ( _orien == VERT) {
if (unity_loc < h ) {
context->move_to (1, unity_loc + .5);
context->line_to (girth - 2.0, unity_loc + .5);
context->stroke ();
}
} else {
if ( unity_loc < w ){
context->move_to (unity_loc + .5, 1);
context->line_to (unity_loc + .5, girth - 2.0);
context->stroke ();
}
}
} else {
if ( unity_loc < w ){
context->set_line_width (1);
context->set_source_rgb (0.0, 1.0, 0.0);
context->move_to (unity_loc, 1);
context->line_to (unity_loc, girth - 2.0);
context->stroke ();
} else { // triangle
Gdk::Color c = get_style()->get_fg (Gtk::STATE_ACTIVE);
context->set_source_rgba (c.get_red_p()*1.25, c.get_green_p()*1.25, c.get_blue_p()*1.25, 0.85);
if ( _orien == VERT) {
if (unity_loc < h ) {
context->move_to (1, unity_loc - 1.0);
context->line_to (1, unity_loc + 2.0);
context->line_to (5.0, unity_loc + 0.5);
cairo_close_path(cr);
context->fill_preserve ();
context->stroke ();
context->move_to (girth - 1, unity_loc - 1.0);
context->line_to (girth - 1, unity_loc + 2.0);
context->line_to (girth - 5, unity_loc + 0.5);
cairo_close_path(cr);
context->fill_preserve ();
context->stroke ();
}
} else {
if ( unity_loc < w ){
context->move_to (unity_loc + 1.0, 1);
context->line_to (unity_loc - 2.0, 1);
context->line_to (unity_loc - 0.5, 5);
cairo_close_path(cr);
context->fill_preserve ();
context->stroke ();
context->move_to (unity_loc + 1.0, girth - 1);
context->line_to (unity_loc - 2.0, girth - 1);
context->line_to (unity_loc - 0.5, girth - 5);
cairo_close_path(cr);
context->fill_preserve ();
context->stroke ();
}
}
}
}