Skip to content

0.1.2 Version is Published !

Choose a tag to compare

@XiangQinxi XiangQinxi released this 23 Jun 08:10
· 17 commits to master since this release

New Features 新增

Some widgets implement gradients when switching themes 部分组件实现切换主题时渐变

FluLabel implements a gradient effect
FluLabel实现了渐变效果

FluLabel实现渐变

from tkflu import *

set_animation_steps(20)
set_animation_step_time(20)

root = FluWindow()

theme_manager = FluThemeManager(root)

button = FluButton(root, text="Button", mode="light", style="standard", command=lambda: theme_manager.toggle())
button.pack(padx=20, pady=20, fill="both", expand="yes")

label = FluLabel(root, text="Label", mode="light")
label.pack(padx=20, pady=20, fill="both", expand="yes")

root.mainloop()

You can set the number of frames and the frame rate for the gradient animation 可设置渐变动画的帧数和帧率

set_animation_steps()  # 动画帧数
set_animation_step_time()  # 动画播放一帧所需的毫秒秒数

Fixes 修复

  1. Fixed a bug where the child widgets would not execute the theme() method when the FluToplevel theme was changed.

  2. Fixed the problem that the FluToggleButton gradient animation could not be modified by set_animation_steps() and set_animation_step_time().

  3. 修复了FluToplevel主题更改时,子组件不会执行theme()方法的错误。

  4. 修复了FluToggleButton渐变动画不可被set_animation_steps()与set_animation_step_time()修改的问题