Skip to content

Commit aa7415a

Browse files
committed
more realistic animation
1 parent 78f6a8d commit aa7415a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/bar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,15 +736,16 @@ def _update_rail_with_animation(self, active_button):
736736
return True
737737

738738
diameter = 24
739+
reduced_diameter = 8 # New variable for reduced size during stretch
739740
if data.VERTICAL:
740741
pos_prop, size_prop = "margin-top", "min-height"
741-
other_size_prop, other_size_val = "min-width", diameter
742+
other_size_prop, other_size_val = "min-width", reduced_diameter
742743
target_pos = (
743744
target_allocation.y + (target_allocation.height / 2) - (diameter / 2)
744745
)
745746
else:
746747
pos_prop, size_prop = "margin-left", "min-width"
747-
other_size_prop, other_size_val = "min-height", diameter
748+
other_size_prop, other_size_val = "min-height", reduced_diameter
748749
target_pos = (
749750
target_allocation.x + (target_allocation.width / 2) - (diameter / 2)
750751
)

0 commit comments

Comments
 (0)