Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小康2022
tkintertools
提交
b0b8f7f0
tkintertools
项目概览
小康2022
/
tkintertools
9 个月 前同步成功
通知
132
Star
13
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
tkintertools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b0b8f7f0
编写于
7月 28, 2023
作者:
小
小康2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
version 2.6.8.dev1
上级
27f979fd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
8 deletion
+22
-8
CHANGELOG.md
CHANGELOG.md
+8
-0
README.md
README.md
+8
-6
tkintertools/__init__.py
tkintertools/__init__.py
+2
-2
tkintertools/__main__.py
tkintertools/__main__.py
+4
-0
未找到文件。
CHANGELOG.md
浏览文件 @
b0b8f7f0
ChangeLog/更新日志
=================
[`2.6.8.dev1`] - 2023-07-28
---------------------------
### Added/新增
-
[X] The class
`Animation`
adds the parameter
`callback`
to extend the functionality
类
`Animation`
新增参数
`callback`
来扩展功能
[`2.6.8.dev0`] - 2023-07-20
---------------------------
...
...
README.md
浏览文件 @
b0b8f7f0
...
...
@@ -9,7 +9,7 @@ The `tkintertools` module is an auxiliary module of the `tkinter` module
[
![Version
](
https://img.shields.io/pypi/v/tkintertools?label=Version
)
](.)
[
![License
](
https://img.shields.io/pypi/l/tkintertools?label=License
)
](LICENSE.txt)
[
![ChangeLog
](
https://img.shields.io/badge/ChangeLog-2023/07/2
0
-orange
)
](CHANGELOG.md)
[
![ChangeLog
](
https://img.shields.io/badge/ChangeLog-2023/07/2
8
-orange
)
](CHANGELOG.md)
[
![ToDo
](
https://img.shields.io/badge/ToDo-16-yellow
)
](TODO.md)
[
![Size
](
https://img.shields.io/github/languages/code-size/Xiaokang2022/tkintertools?label=Size
)
](tkintertools)
[
![Wiki
](
https://img.shields.io/badge/Wiki-14-purple
)
](https://github.com/Xiaokang2022/tkintertools/wiki)
\
...
...
@@ -40,15 +40,15 @@ pip install tkintertools==2.6.7
### Development Version/开发版本
*
Version/最新版本 :
`2.6.8.dev
0
`
(第 1 个预发布版本)
*
Release/发布日期 : 2023/07/2
0
(UTC+08)
*
Version/最新版本 :
`2.6.8.dev
1
`
(第 1 个预发布版本)
*
Release/发布日期 : 2023/07/2
8
(UTC+08)
这个是我正在开发的版本,可能有新功能,bug 可能会比较多,但也可能会比原来的版本更加稳定。开发版没有经过多操作系统的测试,仅能保证在 Windows 系统下运行所有功能,在其他的操作系统上,可能有部分功能无法正常运行。大家可以在 Issues 中提出一些建议,我可能会适当采纳一些并在开发版本中更改或实现。
**PIP Cmd/安装命令:**
```
pip install tkintertools==2.6.8.dev
0
pip install tkintertools==2.6.8.dev
1
```
> **Warning**
...
...
@@ -77,12 +77,12 @@ News/最新功能👇
### Release Notes/版本说明
**最新版本: `tkintertools-v2.6.8.dev
0
`**
**最新版本: `tkintertools-v2.6.8.dev
1
`**
> **Note**
> tkintertools 的介绍、使用教程和开发文档均在 [Wiki](https://github.com/Xiaokang2022/tkintertools/wiki) 中,大家可前往查阅
下面是本次开发版本(
`v2.6.7`
->
`v2.6.8.dev
0
`
)的更新内容条目:
下面是本次开发版本(
`v2.6.7`
->
`v2.6.8.dev
1
`
)的更新内容条目:
-
[X] Added class
`Animation`
to achieve more efficient, convenient and functional animation effects
新增类
`Animation`
来实现更加高效、更加方便和功能性更强的动画效果
...
...
@@ -94,6 +94,8 @@ News/最新功能👇
函数
`move`
即将被弃用,请用新类
`Animation`
来代替
-
[X] The class
`Singleton`
is about to be deprecated and singleton mode classes will no longer be available in subsequent releases
类
`Singleton`
即将被弃用,后续版本中将不再提供单例模式类
-
[X] The class
`Animation`
adds the parameter
`callback`
to extend the functionality
类
`Animation`
新增参数
`callback`
来扩展功能
### Template Demo/模板演示
...
...
tkintertools/__init__.py
浏览文件 @
b0b8f7f0
...
...
@@ -48,14 +48,14 @@ from .__main__ import *
from
.constants
import
*
__author__
=
'Xiaokang2022<2951256653@qq.com>'
__version__
=
'2.6.8.dev
0
'
__version__
=
'2.6.8.dev
1
'
__all__
=
[
# Container Widgets
'Tk'
,
'Toplevel'
,
'Canvas'
,
# Virtual Canvas Widgets
'Label'
,
'Button'
,
'CheckButton'
,
'Entry'
,
'Text'
,
'Progressbar'
,
# Tool Classes
'PhotoImage'
,
'Singleton'
,
'PhotoImage'
,
'Singleton'
,
'Animation'
,
# Tool Functions
'move'
,
'text'
,
'color'
,
'askfont'
,
'SetProcessDpiAwareness'
,
]
+
all_constants
tkintertools/__main__.py
浏览文件 @
b0b8f7f0
...
...
@@ -1397,6 +1397,7 @@ class Animation:
start
=
None
,
# type: Callable | None
step
=
None
,
# type: Callable | None
stop
=
None
,
# type: Callable | None
callback
=
None
,
# type: Callable[[float]] | None
canvas
=
None
# type: tkinter.Canvas | None
):
# type: (...) -> None
"""
...
...
@@ -1409,6 +1410,7 @@ class Animation:
`start`: 动画开始前执行的函数 \
`step`: 动画每一帧结束后执行的函数(包括开始和结束)\
`stop`: 动画结束后执行的函数 \
`callback`: 回调函数,每一帧调用一次,传入参数为单帧占比 \
`canvas`: 当 widget 是画布中的绘制对象时,应指定 canvas
"""
self
.
widget
=
widget
...
...
@@ -1423,6 +1425,7 @@ class Animation:
self
.
count
=
ms
*
fps
//
1000
# 总帧数
if
self
.
count
==
0
:
self
.
count
=
1
# 至少一帧
self
.
callback
=
callback
self
.
parts
=
self
.
_parts
(
*
control
)
def
_parts
(
self
,
control
,
up
,
down
):
...
...
@@ -1446,6 +1449,7 @@ class Animation:
self
.
color
[
0
](
color
(
self
.
color
[
1
:],
sum
(
self
.
parts
[:
_ind
+
1
])))
None
if
self
.
step
is
None
else
self
.
step
()
None
if
self
.
callback
is
None
else
self
.
callback
(
self
.
parts
[
_ind
])
def
_translate
(
self
,
dx
,
dy
):
# type: (int, int) -> None
""" 平移 """
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录