diff --git a/MyTimeline.py b/MyTimeline.py index 420888f..a09bb76 100644 --- a/MyTimeline.py +++ b/MyTimeline.py @@ -1231,32 +1231,40 @@ class MyTimelineView(NavigationView): context.save() + # Position vertical line to the left of year markers + # Year labels are positioned at timeline_x - 20 - text_width (around x=90-130) + # Position vertical line at x=5 to be clearly left of all year markers + vertical_line_x = 5 # Left of year markers + # Draw connecting lines - more visible with brighter color and increased opacity context.set_source_rgba(0.2, 0.5, 1.0, 0.75) # Brighter, more opaque blue context.set_line_width(3.5) # Increased from 2 context.set_line_cap(cairo.LINE_CAP_ROUND) context.set_line_join(cairo.LINE_JOIN_ROUND) - # Draw lines from timeline axis to each event marker - for y_pos, event_data in person_events: - context.move_to(timeline_x, y_pos) - context.line_to(timeline_x + EVENT_MARKER_SIZE * 1.5, y_pos) - context.stroke() - # Draw vertical connector line on the left side if len(person_events) > 1: y_positions = [y for y, _event_data in person_events] min_y = min(y_positions) max_y = max(y_positions) - # Draw a more visible vertical line connecting the range + # Draw vertical line connecting all events if max_y - min_y > EVENT_MARKER_SIZE * 2: - context.set_source_rgba(0.2, 0.5, 1.0, 0.6) # Slightly less opaque but still visible - context.set_line_width(2.5) # Thicker than before - context.move_to(timeline_x - 15, min_y) - context.line_to(timeline_x - 15, max_y) + context.set_source_rgba(0.2, 0.5, 1.0, 0.75) # Same opacity as horizontal lines + context.set_line_width(3.5) # Same width as horizontal lines + context.move_to(vertical_line_x, min_y) + context.line_to(vertical_line_x, max_y) context.stroke() + # Draw horizontal lines connecting vertical line to each event marker + context.set_source_rgba(0.2, 0.5, 1.0, 0.75) # Brighter, more opaque blue + context.set_line_width(3.5) + for y_pos, event_data in person_events: + # Draw horizontal line from vertical line to event marker + context.move_to(vertical_line_x, y_pos) + context.line_to(timeline_x, y_pos) + context.stroke() + context.restore() def get_stock(self):