summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-07-10 00:02:17 +0200
committerRobin Gareus <robin@gareus.org>2013-07-10 15:27:16 +0200
commit7a62d310566916f53192bfd7af7c13846f802b44 (patch)
tree26044f61fdc0c6d7d1e598d90efe3745d7efb566
parent656cc9a0ad9b20f48085fd40bd0e33d66ff61c5d (diff)
Episode VI: Return of the ZeroDBline
-rw-r--r--libs/gtkmm2ext/pixfader.cc64
1 files changed, 13 insertions, 51 deletions
diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc
index 9f9a620488..6e0c642917 100644
--- a/libs/gtkmm2ext/pixfader.cc
+++ b/libs/gtkmm2ext/pixfader.cc
@@ -265,58 +265,20 @@ PixFader::on_expose_event (GdkEventExpose* ev)
/* draw the unity-position line if it's not at either end*/
if (unity_loc > 0) {
context->set_line_width (1);
- if (1 /* XXX */ || girth < 14) { // Line
- context->set_line_cap (Cairo::LINE_CAP_ROUND);
- Gdk::Color c = get_style()->get_fg (Gtk::STATE_ACTIVE);
- context->set_source_rgba (c.get_red_p()*1.5, c.get_green_p()*1.5, c.get_blue_p()*1.5, 0.85);
- if ( _orien == VERT) {
- if (unity_loc < h ) {
- context->move_to (1.5, unity_loc + .5);
- context->line_to (girth - 1.5, unity_loc + .5);
- context->stroke ();
- }
- } else {
- if ( unity_loc < w ){
- context->move_to (unity_loc + .5, 1.5);
- context->line_to (unity_loc + .5, girth - 1.5);
- context->stroke ();
- }
+ context->set_line_cap (Cairo::LINE_CAP_ROUND);
+ Gdk::Color c = get_style()->get_fg (Gtk::STATE_ACTIVE);
+ context->set_source_rgba (c.get_red_p()*1.5, c.get_green_p()*1.5, c.get_blue_p()*1.5, 0.85);
+ if ( _orien == VERT) {
+ if (unity_loc < h ) {
+ context->move_to (1.5, unity_loc + .5);
+ context->line_to (girth - 1.5, unity_loc + .5);
+ 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.5, unity_loc - 1.0);
- context->line_to (1.5, unity_loc + 2.0);
- context->line_to (5.5, unity_loc + 0.5);
- cairo_close_path(cr);
- context->fill_preserve ();
- context->stroke ();
-
- context->move_to (girth - 1.5, unity_loc - 1.0);
- context->line_to (girth - 1.5, unity_loc + 2.0);
- context->line_to (girth - 5.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 ();
- }
+ } else {
+ if ( unity_loc < w ){
+ context->move_to (unity_loc + .5, 1.5);
+ context->line_to (unity_loc + .5, girth - 1.5);
+ context->stroke ();
}
}
}