diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-24 16:28:53 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-24 16:28:53 -0400 |
commit | a1f858d3b207739e0719c1fc28003f1d9dd3965d (patch) | |
tree | 23c9c35f6b95e116f11354b0c78841036dcdc6bb /gtk2_ardour/editor_cursors.cc | |
parent | 0ce393f05144762a20d72975d0254ebca0789973 (diff) |
an awful lot of tweaks to drawing details
Diffstat (limited to 'gtk2_ardour/editor_cursors.cc')
-rw-r--r-- | gtk2_ardour/editor_cursors.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc index 9d8c255d2f..557120c1db 100644 --- a/gtk2_ardour/editor_cursors.cc +++ b/gtk2_ardour/editor_cursors.cc @@ -45,11 +45,11 @@ EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,Ardour _time_bars_canvas_item.set_head_width (0, 16); _time_bars_canvas_item.set_head_outward (0, false); _time_bars_canvas_item.set_show_head (1, false); // head only - _time_bars_canvas_item.set_outline_width (1.5); + _time_bars_canvas_item.set_outline_width (0.5); _time_bars_canvas_item.set_data ("cursor", this); _track_canvas_item.set_data ("cursor", this); - _track_canvas_item.set_outline_width (1.5); + _track_canvas_item.set_outline_width (0.5); _time_bars_canvas_item.Event.connect (sigc::bind (sigc::mem_fun (ed, callbck), &_time_bars_canvas_item)); _track_canvas_item.Event.connect (sigc::bind (sigc::mem_fun (ed, callbck), &_track_canvas_item)); @@ -70,7 +70,11 @@ EditorCursor::set_position (framepos_t frame) { PositionChanged (frame); - double const new_pos = _editor.sample_to_pixel (frame); + /* See Cairo FAQ question on single pixel lines to understand + why we add 0.5 + */ + + double const new_pos = _editor.sample_to_pixel (frame) + 0.5; if (new_pos != _time_bars_canvas_item.x ()) { _time_bars_canvas_item.set_x (new_pos); |