From 905f157ee05b5792bdcc540109205fd4bc4f739a Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sat, 25 Jan 2025 13:02:23 +0100 Subject: [PATCH] Improved comments. --- wobuzz/ui/track_progress_slider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wobuzz/ui/track_progress_slider.py b/wobuzz/ui/track_progress_slider.py index e687ff8..d82f407 100644 --- a/wobuzz/ui/track_progress_slider.py +++ b/wobuzz/ui/track_progress_slider.py @@ -28,8 +28,8 @@ class TrackProgressSlider(QSlider): # old value calculation: # value = self.maximum() * x // self.width() - # but we need that calculation because the handle width is limiting the range, and we need to set - # the slider handle's center to the click position, not the start of the handle + # but we need that new calculation because the handle width is limiting the range, and we need to set + # the slider handle's center to the click position, not to the start of the handle # (self.width() - self.handle_width) calculates the usable width and # (x - self.handle_width // 2) offsets the position by minus half of the handle width value = self.maximum() * (x - self.handle_width // 2) // (self.width() - self.handle_width)