[WIP/TEST] アプデ時にプログレスバーを表示。※WIP 注意事項あり

・他のウィンドウにフォーカスを当てると消えます。(後ろで処理は動いている)
・ダークモードのみの対応です。
・とりあえずの表示です。downloadedとextractedで2回同じものが表示されます。
This commit is contained in:
Sakamoto Shiina
2024-04-14 07:35:34 +09:00
parent e51fd602bf
commit fe1c0a45d7
4 changed files with 57 additions and 24 deletions

View File

@@ -71,6 +71,22 @@ def calculateUiSize(default_size, scaling_float, is_allowed_odd:bool=False, is_z
return size
# This making gradient color process was made by ChatGPT.
def generateGradientColor(value, color_start, color_end):
# 補完色を計算
interpolated_color = [
int(start + (end - start) * value) for start, end in zip(color_start, color_end)
]
# RGB値を0から255の範囲にクリップ
interpolated_color = [max(0, min(255, val)) for val in interpolated_color]
# RGBを16進数に変換
hex_color = "#{:02x}{:02x}{:02x}".format(*interpolated_color)
return hex_color
def bindEnterAndLeaveColor(target_widgets, enter_color, leave_color):
for target_widget in target_widgets:
target_widget.bind("<Enter>", lambda e, widgets=target_widgets: [w.configure(fg_color=enter_color) for w in widgets], "+")