commit 70

This commit is contained in:
2025-08-08 13:53:40 +02:00
parent 2e934c62e4
commit fda52d52d4
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import tkinter as tk
from math import sin, cos, pi
try:
from PIL import Image, ImageDraw, ImageTk
PIL_AVAILABLE = True
@@ -145,12 +146,12 @@ class AnimatedIcon(tk.Canvas):
radius_outer = min(center_x, center_y) * 0.8
bbox_outer = (center_x - radius_outer, center_y - radius_outer, center_x + radius_outer, center_y + radius_outer)
start_angle1 = self.angle * 180 / pi
self.draw.arc(bbox_outer, start=start_angle1, end=start_angle1 + 150, fill=self.highlight_color_rgb, width=5)
self.draw.arc(bbox_outer, start=start_angle1, end=start_angle1 + 150, fill=self.highlight_color_rgb, width=7)
radius_inner = min(center_x, center_y) * 0.6
bbox_inner = (center_x - radius_inner, center_y - radius_inner, center_x + radius_inner, center_y + radius_inner)
start_angle2 = -self.angle * 180 / pi + 60
self.draw.arc(bbox_inner, start=start_angle2, end=start_angle2 + 150, fill=self.color_rgb, width=5)
self.draw.arc(bbox_inner, start=start_angle2, end=start_angle2 + 150, fill=self.color_rgb, width=7)
def _animate(self):
if self.running: