- Extract tooltip-related constants Added TOOLTIP_OFFSET, TOOLTIP_LABEL_MARGIN, TOOLTIP_MAX_WIDTH_CHARS, TOOLTIP_BORDER_WIDTH Replaced magic numbers in show_tooltip() and tooltip window creation - Extract drawing-related constants Added TIMELINE_SHADOW_OFFSET, TIMELINE_SHADOW_OPACITY Extracted background and timeline axis gradient colors to constants Grouped color constants in dedicated Drawing Color Constants section - Use existing constants in filter dialog Replaced hardcoded spacing/margin values with FILTER_PAGE_SPACING and FILTER_PAGE_MARGIN - Add _queue_draw() helper method Created helper to safely queue drawing area redraw Replaced 12+ occurrences of 'if self.drawing_area: self.drawing_area.queue_draw()' pattern - Add _set_validation_message() helper method Created helper for setting date validation messages Replaced 7+ occurrences of hasattr checks and manual label updates Provides consistent validation message handling All magic numbers extracted, code patterns consolidated, maintainability improved
Description
MyTimeline Gramps plugin
Languages
Python
94.2%
Shell
5.8%