From 37d87e1fdb0c1e8b7029706a28cbdca7e6436ee3 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 18:04:34 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`improve?= =?UTF-8?q?-ui-experience`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @DevStrategist. * https://github.com/DevStrategist/SubtitleSync/pull/1#issuecomment-3638287164 The following files were modified: * `subtitle_sync.py` --- subtitle_sync.py | 428 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 403 insertions(+), 25 deletions(-) diff --git a/subtitle_sync.py b/subtitle_sync.py index abad8da..a8ce93f 100644 --- a/subtitle_sync.py +++ b/subtitle_sync.py @@ -43,6 +43,16 @@ class Colors: class Tooltip: """Modern tooltip implementation""" def __init__(self, widget, text, delay=500): + """ + Initialize a Tooltip for a given Tkinter widget. + + Creates a tooltip instance that will display `text` near `widget` after `delay` milliseconds when the pointer enters the widget; it also binds pointer leave and button events to hide the tooltip. + + Parameters: + widget (tk.Widget): The widget to attach the tooltip to. + text (str): The message to display in the tooltip. + delay (int): Milliseconds to wait after pointer enter before showing the tooltip. + """ self.widget = widget self.text = text self.delay = delay @@ -54,9 +64,26 @@ def __init__(self, widget, text, delay=500): widget.bind('