Changelog
2 words less than 1 min read views
Tip / 提示
This changelog has the following 7 types of updates, each of which is represented by 7 different colors
此更新日志有以下 7 中类型的更新内容,分别用 7 中不同颜色来表示
- 🟢 Added / 新增
- 🔴 Removed / 移除
- 🟡 Changed / 变更
- 🔵 Optimized / 优化
- 🟣 Fixed / 修复
- 🟠 Deprecated / 弃用
- 🟤 Refactored / 重构
🔖 3.1.5¶
🕓 Release Date / 发布日期 : 2025-09-27
🟢 Added / 新增
- Add a new extension package:
maliang-table
新增了一个扩展包:maliang-table
🟣 Fixed / 修复
-
Fix typos in the parameters of some functions in submodules
color.rgbandcolor.hsl
修复子模块color.rgb和color.hsl中一些函数的参数的错别字 -
Fixed a typo in the instance variable
initial_imageof the classvirtual.Image
修复了类virtual.Image的实例变量initial_image的错别字
🟤 Refactored / 重构
- Improve code for readability and maintainability
改善代码,提高可读性和可维护性
🔖 3.1.4¶
🕓 Release Date / 发布日期 : 2025-08-02
🔵 Optimized / 优化
- Share the style data of the object
Style, reducing memory consumption and speeding up widget building
共享对象Style的样式数据,减少内存消耗并提升控件构建速度
Issue: #129
🟤 Refactored / 重构
- Improve code for readability and maintainability
改善代码,提高可读性和可维护性
🔖 3.1.3¶
🕓 Release Date / 发布日期 : 2025-06-29
🟢 Added / 新增
- Added method
existsto all widgets
为所有控件新增了方法exists
Issue: #125
🟣 Fixed / 修复
-
Fixed a bug where the value of the widget
SpinBoxcould cause unexpected results when the value was large
修复了控件SpinBox在值比较大时会导致意外结果的 bug
Issue: #122 -
Fixed a bug where the widget
Canvaswould be updated unexpectedly
修复了控件Canvas会被意外更新的 bug
Issue: #124
🔵 Optimized / 优化
- Reduced the amount of memory used by the widget after calling the
destroymethod
降低了控件在调用方法destroy后所占用的内存量
🔖 3.1.2¶
🕓 Release Date / 发布日期 : 2025-06-17
🟢 Added / 新增
-
Some widgets have added the ability to automatically and dynamically update the size
一些控件可以自动地动态更新大小
Issue: #119 (Partially Resolved) -
Added parameter
fontto functionget_text_size
函数get_text_size增加了参数font
🟣 Fixed / 修复
- Fixed a bug where the widgets
TextandImagewould unexpectedly modify the mouse style (3.1.1regression)
修复了控件Text和Image会意外修改鼠标样式的 bug(3.1.1回归)
🔖 3.1.1¶
🕓 Release Date / 发布日期 : 2025-06-16
🟢 Added / 新增
-
Keyboard Tab and Shift+Tab are supported to manipulate widgets, and Enter is used to simulate clicking on a widget with focus
支持通过键盘 Tab 和 Shift+Tab 来操控控件,并通过 Enter 来模拟点击具有焦点的控件
Issue: #70 -
Add method
regionto classvirtual.Widgetto get the display area of the current widget
类virtual.Widget新增方法region来获取当前控件的显示区域 -
Add method
centerto classvirtual.Widgetto get the center coordinates of the display area of the current widget
类virtual.Widget新增方法center来获取当前控件的显示区域的中心坐标 -
Add parameter
wrap_lengthto functionutility.get_text_size
函数utility.get_text_size新增参数wrap_length -
Improve some type hints
完善部分类型提示
🟣 Fixed / 修复
-
Fix a bug where the widget
Tooltipdid not work for the widgetTextandImage
修复控件Tooltip无法对控件Text和Image生效的 bug
Issue: #77 -
Fix some incorrect type hints
修复部分错误的类型提示
🔖 3.1.0¶
🕓 Release Date / 发布日期 : 2025-06-10
🟢 Added / 新增
-
Some animation classes can take effect on multiple objects at the same time
一些动画类可以对多个对象同时生效
Issue: #106 -
Add method
liftto classvirtual.Widget
类virtual.Widget新增方法lift
Issue: #116 -
Add the ability for widget
Textto set the length of character wrapping
给控件Text增加能够设置自动换行的字符长度的功能
Issue: #97 -
Some functionalities for operating widgets using the keyboard have been implemented
实现了一些使用键盘操作控件的功能
Issue: #70 (Partially Resolved)
🟣 Fixed / 修复
-
Fix a bug that generating unexpected warnings
修复了生成非预期警告的 bug
Issue: #117 -
Fix an exception caused by inconsistent state parameters when updating nested widgets
修复更新嵌套控件时状态参数不一致导致的异常
Issue: #113 -
Fix a wrong type hint
修复一个错误的类型提示
🔵 Optimized / 优化
- Reduce memory usage and improve responsiveness
降低内存使用量并提高事件响应速度
🔖 3.0.5¶
🕓 Release Date / 发布日期 : 2025-05-10
🔵 Optimized / 优化
-
Improve the performance of functions
color.rgb.blendandcolor.hsl.blend
提高了函数color.rgb.blend和color.hsl.blend的性能 -
Optimize part of the import, increasing the import speed
优化部分导入,提高导入速度
🔖 3.0.4¶
🕓 Release Date / 发布日期 : 2025-04-09
🟣 Fixed / 修复
-
Fix a bug where the cursor still flashes when widget
InputBoxis disabled
修复了控件InputBox在禁用后光标仍然闪烁的 bug
Issue: #92 -
Fix an issue where the widget
InputBoxis freezing in some cases when entering text
修复了控件InputBox在高度设置比较大的时候,限制文本长度将导致程序卡死的 bug
Issue: #100 -
Fix a bug where the text of widget
InputBoxwill extend beyond the text box
修复了控件InputBox的文本会超出文本框边界的 bug
Issue: #101 -
Partially fix a bug that cause the window to flicker when it started
部分修复了窗口在启动时会闪烁的 bug
Issue: #102
🔖 3.0.3¶
🕓 Release Date / 发布日期 : 2025-03-20
🟢 Added / 新增
-
Add a read-only property
childrento virtual widget classWidgetto access its child widgets
增加了一个只读的属性children给虚拟控件类Widget来访问它的子控件 -
Add a basic class
TkFileChooserto accommodate moduletkinter
增加了一个基础的类TkFileChooser来适配模块tkinter
Pull Request: #82 Contributor: @3190
🟣 Fixed / 修复
-
Fix the bug that the
ComboBoxwidget can not close the selection box without selecting it after clicking to open it
修复了控件ComboBox在点击打开选项列表后不选中选择框就无法关闭的 bug
Issue: #87 Pull Request: #89 Contributor: @shu-shu-1 -
Fix some typos
修正了一些错字
🔖 3.0.2¶
🕓 Release Date / 发布日期 : 2025-03-05
🟣 Fixed / 修复
animation.animations.MoveTkWidgetwill produce an incorrect displacement fortkinterwidgets with a parameteranchorthat is not equal to"nw"
animation.animations.MoveTkWidget会对参数anchor不等于"nw"的tkinter控件产生错误的位移
Issue: #81
🔖 3.0.1¶
🕓 Release Date / 发布日期 : 2025-02-26
🟢 Added / 新增
- Add initialization parameter
ignoreto the widgetInputBoxto ignore partially inserted characters
控件InputBox新增初始化参数ignore来忽略部分插入的字符
Issue: #78
🟣 Fixed / 修复
-
Fix a bug where pasting multiple lines of text in the widget
InputBoxwould cause the text to overflow
修复了在控件InputBox中粘贴多行文本会导致文本溢出的 bug
Issue: #78 -
Fix a type hint error
修复了一个类型提示错误 -
Fixed an issue where the metadata information of the distributed package was incorrect
修复了分发包的元数据信息存在错误的问题
🔖 3.0.0¶
🕓 Release Date / 发布日期 : 2025-01-26
🟢 Added / 新增
-
Add methods
getandsetto some widgets
给一些控件增加方法get和set -
A new parameter
auto_detecthas been added to the methodbindof the widgets to determine whether to automatically check the location of the decision
新参数auto_detect已添加到控件的方法bind中,以确定是否自动检查决策的位置 -
Add methods
modifiedandtransparentto classTk
给类Tk增加了方法modified和transparent
Pull Request: #65 Contributor: @CodeCrafter-TL
🟣 Fixed / 修复
-
Fix a bug where calling function
apply_themein non-Windows systems caused unnecessary warnings
修复了在非 Windows 系统中调用函数apply_theme导致不必要警告的错误 -
Fix a bug where the optional package
darkdetectcan not be imported on some Windows platforms
修复了在某些 Windows 平台无法导入包darkdetect的问题 -
Fix a bug where the widgets
ComboBoxandOptionButtoncan be obscured by other widgets
修复了控件ComboBox和OptionButton可能被其他控件遮挡的问题
🟡 Changed / 变更
- Improve the color style of the widget
SegmentedButtonand its related widgets
改进控件SegmentedButton及其相关控件的颜色样式
🟤 Refactored / 重构
- Change some code written with module
platformto modulesysto provide better type hints
将部分用模块platform写的代码改用模块sys重写来提供更好的类型提示
🔖 3.0.0rc6¶
🕓 Release Date / 发布日期 : 2025-01-13
🟢 Added / 新增
-
Add disabled mouse cursor styles
新增控件禁用状态时的鼠标样式 -
Add function
create_smoketo create translucent rectangular areas
新增函数create_smoke来创建半透明的矩形区域 -
Add widget virtual composition class
virtual.Styleto control the style of a widget
新增控件虚拟组成类virtual.Style来控制一个控件的样式 -
Add a new submodule
standard.styles
新增模块standard.styles -
Add method
setto classStyleto quickly modify the style of the widget
类Style新增方法set来快速修改控件样式 -
Add a new experimental image element
Smoke
增加了一个实验性的图片元素Smoke -
Add an experimental parameter
zoom_all_itemstoCanvas
增加了一个实验性参数zoom_all_items给Canvas -
Add method
skipto classAnimationto skip some loops
增加了方法skip来跳过类Animation的一些循环 -
Add the ability to use the with statement to the containers
容器控件现在可以使用 with 语句来临时创建并删除了 -
Add a new theme
"acrylic2"to functionapply_theme
函数apply_theme新增配置选项"acrylic2" -
Canvasnow supports automatic get the default master
Canvas现在可以自动获取默认的父控件了 -
Now can specify the style to modify a theme
现在修改单个控件的主题时可以指定某个主题了
🟣 Fixed / 修复
-
Fix a bug where classes
TkandToplevelmay not work on Linux platforms
修复了类Tk和类Toplevel可能无法在 Linux 平台上无法运行的 bug -
Fix class
animations.MoveWindowmay report an error when passing in certain parameters
修复了类animations.MoveWindow传入某些参数时可能报错的 bug -
Fix a bug where widgets would flicker unexpectedly when changing colors
修复了修改控件颜色时会意外闪烁的 bug -
Fix a bug where the animation did not completely stop when the
Elementwas destroyed
修复了元素删除时其动画不会停止的 bug -
Fix a bug where widgets don’t scale their nested widgets in some cases
修复了控件在某些情况下不会缩放其嵌套控件的 bug -
Fix a bug where the coordinates of the Image element were incorrectly detected
修复了元素Image的坐标被错误检测的 bug -
Fix a bug where the registered theme processing event was not deleted when the root window was deleted
修复了当根窗口被删除时其注册的样式处理事件没有被删除的 bug -
Fixed a bug where the function
get_text_sizereturn value is inaccurate
修复了函数get_text_size返回值在某些情况下不不准确的 bug -
Fix a bug where deleting a
Canvaswould not automatically delete theWidget, resulting in the widget’s animation not automatically terminating
修复了删除Canvas不会自动删除Widget的错误,从而导致 Widget 的动画不会自动终止 -
Fix a bug where style switch of
containers.Tkdoes not automatically take effect on child windows
修复了类containers.Tk的样式切换时不会应用于子窗口的 bug -
Fix a bug where some of methods of containers.Tk do not work on non-Windows systems
修复containers.Tk的部分方法无法在非 Windows 平台上生效的 bug -
Fix the bug that function
load_fontcan not take effect in some cases under the Linux platform
修复了某些情况下函数load_font无法在 Linux 平台上生效的 bug -
Fix a bug where function
apply_themedo not take effect when the parameter is"mica"
修复了函数apply_theme在 Windows 平台上输入参数"mica"时无效的 bug -
Fix a bug where the icon of the window can not be set on the Linux platform
修复了在 Linux 平台下窗口的图标无法设置的 bug -
A new method
grouphas been added to theRadioBoxwidget to combine other radio widgets
控件RadioBox新增方法group来绑定其它单选框控件 -
Fix a bug where an error is reported when auto-calculating styles in the disabled state due to the inability to process empty strings
修复了控件在禁用状态自动计算状态时因传入空字符串而报错的 bug -
Fix a bug where the selected part of the text box has a border
修复了文本框在选中文本时有一个边框的 bug -
Fix a bug where Canvas initialization failed in some cases
修复了某些情况下画布在初始化时会失败的 bug -
Fix a bug where the window size would change when the title bar is hidden
修复了隐藏窗口标题栏时窗口大小会改变的 bug -
Fix a bug where an error is reported when disabling widgets with
Imageelements
修复了禁用含图片元素的控件时会报错的 bug -
Fix a bug where the default font on macOS platform is not recognized by
matplotlib
修复了在 macOS 平台上的默认字体无法被matplotlib包识别的 bug
🔵 Optimized / 优化
- Change some
update_idletaskstoupdateto improve speed performance
修改了部分update_idletasks为update来提升性能
🔴 Removed / 移除
-
Removed class
Frameand its styles
移除了类Frame及其样式 -
Removed the original subpackage
theme
移除了原来的子包theme
🟤 Refactored / 重构
-
Refactor subpackage
color
重构了子包color -
Refactor submodule
animation
重构了子包animation -
Refactor submodule
configs
重构了子模块configs -
Refactor submodule
containers
重构了子模块containers -
Refactor style control mechanism
重构了样式控制机制 -
Refactor subpackage
styleand renamed totheme
重构子包style并重命名为theme -
Refactor widget
RadioButtonand renamed toRadioBox
重构控件RadioButton并重命名为RadioBox -
Refactor widget
CheckButtonand renamed toCheckBox
重构控件CheckButton并重命名为CheckBox
🔖 3.0.0rc5¶
🕓 Release Date / 发布日期 : 2024-12-19
🟢 Added / 新增
-
A new property
is_activehas been added to the classAnimationto represent the state of the animation
类Animation新增了一个属性is_active表征动画的状态 -
Class
virtual.Widgethas a new methodis_nestedto determine if the widget is nested
类virtual.Widget新增了一个方法is_nested来判断该控件是否为嵌套控件 -
Added the global configuration option
enable_animationto enable the color gradient animation of the widget
新增全局配置选项enable_animation来设置控件颜色渐变动画是否启用 -
New widget:
OptionButton
新增控件:选项按钮(OptionButton) -
New widget:
ComboBox
新增控件:下拉框(ComboBox) -
New widget:
Spinner
新增控件:旋转条(Spinner) -
Classes
TkandTopleveladded the parametericonto set the icon of the window
类Tk和Toplevel新增了参数icon来设置窗口的图标 -
Class
texts.SingleLineTextadded a new parameterlimit_widthto show the maximum width of the text display
类texts.SingleLineText新增了参数limit_width来显示文本显示的最大宽度
🟣 Fixed / 修复
-
Fixed a bug where the parameter
endof the classAnimationwas called with an error causing the animation to terminate
修复了类Animation的参数end被调用时产生错误导致动画终止的 bug -
Fixed a bug where the default root window could not be obtained in some cases
修复了某些情况下无法获取默认根窗口的 bug -
Fixed a bug where the content of the class
virtual.Textcould not be changed when the parameterlimitwas negative
修复了类virtual.Text的参数limit为负数时,内容无法更改的 bug -
Fixed a bug where the method
detectfor nested widgets had inaccurate results
修复了嵌套控件的方法detect结果不准确的 bug -
Fixed a bug where the method
updateof nested widgets sometimes did not take effect
修复了嵌套控件的方法update有时不生效的 bug -
Fixed a bug where nested widgets could not be disabled
修复了嵌套控件无法禁用的 bug -
Fixed a bug where the placeholder character of the widget
InputBoxwould sometimes be displayed at the same time as the text content
修复了控件InputBox的占位字符有时会和文本内容同时显示的 bug -
Fixed a bug where the parameter
throughof the widgetSpinBoxwas passed incorrectly
修复了控件SpinBox的参数through传递不正确的 bug -
Fixed a bug where the
anchorparameter of the widgetSpinBoxdid not take effect
修复了控件SpinBox的参数anchor不生效的 bug -
Fixed a bug where the text of the widget
SpinBoxwas obscured by the numeric adjustment button
修复了控件SpinBox的文本被数值调节按钮遮挡的 bug
🔵 Optimized / 优化
- Invisible widgets are no longer handled by the event handling mechanism
不可见的控件现在不会被事件处理机制处理了
🔖 3.0.0rc4¶
🕓 Release Date / 发布日期 : 2024-11-17
🟢 Added / 新增
-
The fine-grained scaling of widgets has been improved, and the position and size of the widgets can now be scaled separately by the new parameters of the method
zoomof widgets, as described in the documentation
提高了控件缩放的细粒度,现在可以通过控件的zoom方法的新参数分别缩放控件的位置和大小,具体参数见文档 -
Added parameters to the widget
SpinBoxto control the size of each time the value is modified and the format in which the value is displayed, see the documentation
控件SpinBox新增参数来控制每次修改值时的大小以及值显示的格式,具体参数见文档 -
The widget
InputBoxadds the ability of key Del to delete text
控件InputBox新增 Del 键的功能来删除文本
🔵 Optimized / 优化
-
The function
controllers.controller_generatornow warn when a parameter passed to function is inappropriate
现在传递给函数controllers.controller_generator的参数不合适时会发出警告 -
Now use the descriptor to get the default root window dynamically
现在使用描述器来动态获取默认的根窗口 -
The time error of the animation has been reduced
减小了动画的时间误差 -
Improved type hints
改善类型提示 -
Improved code style
改善代码风格
🟣 Fixed / 修复
-
Fixed a bug where the widget
SegmentedButtonwould show the wrong position when using theanchorparameter
修复了控件SegmentedButton使用参数anchor时会显示错位的 bug -
Fixed a bug where nested widgets could not be destroyed gracefully
修复了嵌套控件无法正常删除的 bug -
Fixed a bug where it was not possible to delete a widget with a lower creation order widget
修复了无法用创建顺序靠后的控件去删除创建顺序靠前的控件的 bug -
Fixed a bug where the widget
InputBoxcould produce an error when deleting text
修复了控件InputBox在删除文本时可能产生错误的 bug -
Fixed a bug where the widget
InputBoxcould produce an error when using the experimental Select All feature
修复了控件InputBox在使用实验性全选功能时可能产生错误的 bug -
Fixed a bug where the widget
SpinBoxwould produce an error when using the built-in adjustment value feature
修复了控件SpinBox在使用自带的调节值功能时会产生错误的 bug
🟤 Refactored / 重构
-
Refactored submodule
core.constantsand renamed tocore.configs
重构子模块core.constants并重命名为core.configs -
Refactoring the entire event handling mechanism to now bind and handle events almost exactly like native
tkinter
重构整个事件处理机制,现在几乎可以完全像原生tkinter那样绑定和处理事件了
🔴 Removed / 移除
-
Removed useless submodule
standard._auxiliary
移除了无用子模块standard._auxiliary -
The function
toolbox.set_mouse_positionhas been removed and will be moved to a different project in the future
移除了函数toolbox.set_mouse_position,后续会将其移动到其它项目中
🔖 3.0.0rc3¶
🕓 Release Date / 发布日期 : 2024-10-24
🟢 Added / 新增
-
New widget, tooltip (
Tooltip)
新增控件,工具提示框(Tooltip) -
All widgets have a new initialization parameter,
anchor, to specify the anchor location
所有控件都新增了初始化参数anchor来指定锚点位置 -
New methods
bind,unbind,bind_on_updateandunbind_on_updatefor all widgets
所有控件新增方法bind、unbind、bind_on_update和unbind_on_update
🔵 Optimized / 优化
-
The function
get_text_sizenow can calculate multiple lines of text correctly
函数get_text_size可以正确计算多行文本了 -
The function
get_text_sizeadded the parametermaster, which can improve performance when used
函数get_text_size增加了参数master,当使用该参数时可以提升性能 -
Some code outputs an error message in stderr when it causes a problem, rather than no output at all (e.g., when a function in a theme switching thread throws an error)
部分代码产生问题时会在标准错误输出中输出错信息,而不是不产生任何输出(如主题切换线程中的函数引发错误时)
🟣 Fixed / 修复
-
Fixed a bug where setting the style identity to a class would cause an error
修复了样式标识设置为类会导致错误的 bug -
Fixed a bug where the size would not be calculated correctly when the font was italicized or bold, causing the widget to display incorrectly
修复了字体为斜体或者粗体时,大小不会被正确计算,导致控件显示不正确的 bug -
Fixed a bug that font loading may fail in some cases under Windows
修复 Windows 系统下,部分情况下字体加载可能失败的 bug -
Fixed a bug where the results of the functions
rgb.contrastandhsl.contrastwere incorrect
修复了函数rgb.contrast和hsl.contrast的结果不正确的 bug
🟡 Changed / 变更
- Parameter names for some functions have been changed (the original name violates lint)
部分函数的参数名称发生的改变(原名称违背了 lint)
🔴 Removed / 移除
-
Removed some of the redundant parameters of the class
Text
移除了类Text的部分冗余参数 -
Removed unused classes and functions
移除了未使用的类和函数
🔖 3.0.0rc2¶
🕓 Release Date / 发布日期 : 2024-09-16
🟢 Added / 新增
-
Implemented the ability to play videos, see Xiaokang2022/tkintertools-media
实现了播放视频的功能,见:Xiaokang2022/tkintertools-media -
Added a parameter called
anchortoImage
Image增加了一个名为anchor的参数 -
Added some aliases
增加了一些别名 -
Added method
resizeto classPhotoImage
类PhotoImage增加了方法resize -
Added a
callbackparameter to thesetmethod of the relevant widget to control whether the callback function is also called when the method is called
相关控件的set方法增加了参数callback来控制当该方法被调用时回调函数是否被调用
🟡 Changed / 变更
-
Changed default value of parameter
anchorofText
修改了Text的参数anchor的默认值 -
Changed the API of
SegmentedButton
修改了SegmentedButton的 API
🟣 Fixed / 修复
-
Fixed a bug where widget
SegmentedButtonhad incorrect function bindings
修复SegmentedButton的函数绑定不正确的 bug -
Fixed a bug where disabling styles would not recalculate
修复了禁用样式不会重复计算的 bug -
Fixed a bug where fonts could not be loaded on Linux OS
修复了字体加载函数在 Linux 操作系统上不生效的 bug -
Fixed a bug where the return value of method
alphaof classTkwas incorrect
修复Tk的方法alpha的返回值不正确的 bug -
Fixed a bug where some methods of class
Tkwere called and the window style was lost
修复了类Tk的某些方法被调用时会导致窗口丢失样式的 bug -
Fixed some incorrect type hints and missing parameters
修复了一些不正确的类型提示和丢失的参数 -
Fixed a bug where the widget
Imagemust be forced to initialize the image parameter, otherwise an error may be reported
修复了控件Image必须强制指定图片,否则会报错的 bug
🔵 Optimized / 优化
-
Optimized method
shutdownof classTk
优化了类Tk的方法shutdown -
The font loading function has been optimized so that parameter
privatehas a certain effect on Linux systems
字体加载函数被优化使得其private参数能在 Linux 操作系统上产生一定的作用 -
Class
MoveTkWidgethas been optimized to prevent it from getting widget data that is not up to date
类MoveTkWidget被优化以防止其获取到的控件数据不是最新的 -
Improved doc string
改善了文档字符串
🔴 Removed / 移除
- Removed initialization parameter
transientof classToplevel
移除了类Toplevel的初始化参数transient
🔖 3.0.0rc1¶
🕓 Release Date / 发布日期 : 2024-08-08
🟢 Added / 新增
-
The widget
Textadded methodsgetandsetto get and modify its text content
控件Text添加了get和set方法,用于获取和修改其文本内容 -
Added widget
Image
添加了控件:Image -
Added container widget
Frameto assist with layout
添加了容器控件Frame以协助布局 -
The container widget
Canvashas added the methodclearto clear everything drawn inside it
容器控件Canvas添加了clear方法,以清除其中绘制的所有内容 -
Widgets can now be nested within widgets
控件现在可以嵌套在控件中了 -
The submodule
toolsadded a functionget_text_sizeto get the size of the text
子模块tools添加了一个函数get_text_size用于获取文本的大小 -
Added the incomplete Select All function, which can select all, but due to the imperfection of the function of selecting the text with the mouse, the Select All function cannot select the undisplayed text
新增了不完整的全选功能,可以全选,但由于鼠标选择文本的功能不完善,导致全选功能无法选择未显示的文本 -
virtual.Widgethas a new method calleddetectto determine the range based on the data of the widget itself
virtual.Widget新增了一个名为detect的方法,其根据控件本身的数据确定的范围来进行检测 -
Added
HalfRoundedRectangularshape class
添加了形状类HalfRoundedRectangular -
Added widget:
ToggleButton
添加了控件:ToggleButton -
Added widget:
SegmentedButton
添加了控件:SegmentedButton -
Added widget:
SpinBox
添加了控件:SpinBox -
The subpackage
standardadded an internal submodule_auxiliaryto define some auxiliary widgets
子包standard添加了一个内部子模块_auxiliary来定义一些辅助控件 -
The
GOLDEN_RATIOconstant has been added
增加了常量GOLDEN_RATIO -
Added experimental implementations of widgets
OptionButtonandComboBox
添加了控件OptionButton和ComboBox的实验性实现
🔴 Removed / 移除
-
The code for the
matplotlibrelated interface part is separated
将matplotlib相关接口部分的代码分离了 -
Due to some conflicts, the binding and handling of the mouse double-click event has been removed
由于存在一些冲突,删除了鼠标双击事件的绑定和处理
🟡 Changed / 变更
-
Re-change the text defaults of the widget to an empty string
将控件的文本默认值重新更改为空字符串 -
Rename the widgets
EntryandInformationtoInputBoxandText, respectively
将控件Entry和Information分别重命名为InputBox和Text -
The “Feature” suffix has been added to the class names of several
Featureclasses to prevent them from being indistinguishable from theWidgetclass in the error message
“Feature” 后缀已添加到多个Feature类的类名中,以防止它们与错误消息中的Widget类无法区分
🔵 Optimized / 优化
-
Optimized decision detection for
OvalandSemicircularRectangle
优化了Oval和SemicircularRectangle的检测判定方法 -
The
Switchwidget added more animations
Switch添加了更多动画 -
Shapescaling has been improved: the scale has been changed from direct scaling to calculating the position to prevent the proportions of some parts from being broken
改进了Shape的缩放:缩放已从直接缩放更改为计算位置后缩放,以防止某些部分的比例被破坏 -
All widgets that involve text now do not need to be forced to specify the size at initialization, and it automatically calculates the size of text without line breaks
现在,所有涉及文本的控件都不需要在初始化时强制指定大小,它会自动计算没有换行符的文本的大小 -
Optimized the
RoundedRectanglesubclass of theShapeclass
优化了Shape的子类RoundedRectangle -
Improved the docstrings, error messages, and warning messages
改善了文档字符串、错误消息和警告消息
🟣 Fixed / 修复
-
Fixed a bug where
IconButtonwas missing style files
修复IconButton缺少样式文件的 bug -
Fixed a bug where the
Slidercould be activated unexpectedly when disabled
修复Slider在禁用时可能会意外激活的 bug -
Fixed a bug where text had no effect on modifying its properties after scaling
修复了文本在缩放后修改其属性不起作用的 bug -
Fixed a bug where some widgets with default values could repeatedly call the method
set, causing the widget appearance to be misaligned
修复了某些具有默认值的控件可能会重复调用方法set从而导致控件外观错位的 bug -
Fixed a bug where some highly custom widgets would report an error when zooming
修复了某些高度自定义的控件在缩放时会报错的 bug
🟤 Refactored / 重构
-
Refactored the
stylesubpackage, reformatted the style file, and now supports two ways to import themes. That is, import as a JSON file, or directly import using a Python file
重构了style子包,重新格式化了样式文件,现在支持两种导入主题的方式。即使用 JSON 文件导入,或直接使用 Python 文件导入 -
Removed the original JSON format style file, and added
themesubpackage to store the style data as a Python file, so as to solve the bug that the default style file is lost in project packaging
移除了原有的 JSON 格式样式文件,并添加了theme子包,将样式数据存储为 Python 件,从而解决了项目打包时默认样式文件丢失的 bug
🔖 3.0.0.beta4¶
🕓 Release Date / 发布日期 : 2024-07-20
🟢 Added / 新增
-
The widget
Entryhas a new parameterplaceholderto display the prompt information
控件Entry新增了参数placeholder来实现提示信息的显示 -
Added parameter
showto the widgetEntryto mask characters (e.g. password box)
控件Entry新增了参数show来实现字符的掩盖(如密码框) -
The new parameter
alignhas been added to the widgetEntryto achieve a similar effect to thetext-alignof tags in HTML, i.e. the left, right, and center layout of the text
控件Entry新增了参数align来实现于 HTML 里的标签的text-align类似的效果,即文本的靠左、靠右和居中布局 -
The widget
Entryhas been added to move the text prompt by pressing the left and right keys on the keyboard
控件Entry新增了通过按下键盘的左右键来移动文本提示符的功能 -
Added text selection to the widget
Entry
控件Entry新增了文本选中的功能 -
The widget
Entryhas added shortcuts to copy (Ctrl+C), paste (Ctrl+V) and cut (Ctrl+X)
控件Entry新增了快捷键复制(Ctrl+C)、粘贴(Ctrl+V)和剪切(Ctrl+X)的功能 -
Added widget slider (
Slider)
新增了控件滑动条(Slider) -
Added widget icon button (
IconButton)
新增了控件图标按钮(IconButton) -
Added some missing docstrings
增加了部分缺失的文档字符串
🟡 Changed / 变更
-
The color of the widget
Entryhas been changed slightly under Windows 10 to enhance the look
控件Entry在 Windows 10 操作系统下的颜色略有改变,以提升观感 -
The position of the text of the widget
Entryin the text box has been slightly corrected to improve the look
控件Entry的文本在文本框中的位置被稍微修正了一下,以提升观感
🟣 Fixed / 修复
- Fixed a bug where deleting text from the widget
Entryin some cases would cause the program to loop in an endless loop
修复了控件Entry某些情况下删除文本会导致程序死循环的问题
🔵 Optimized / 优化
- Improved the readability of some codes
增强了部分代码的可读性
🔴 Removed / 移除
-
Widget
Entryremoved the parametersjustifyandanchor
控件Entry移除了参数justify和anchor -
Removed the 3D part of the code and related theme files
移除了 3D 部分代码以及相关主题文件
🔖 3.0.0.beta3¶
🕓 Release Date / 发布日期 : 2024-06-17
🟢 Added / 新增
-
The docstrings for a portion of the code has been added
添加了一部分代码的文本字符串 -
animation.animationshas added classMoveTkWidgetto move a tkinter widget
animation.animations新增类MoveTkWidget来移动一个 tkinter 控件 -
core.containers.Canvasadded the parameternameto bind the theme
core.containers.Canvas新增参数name来绑定主题 -
core.containers.Canvasadded method_zoom_childrento scale the tkinter widget of the Place layout
core.containers.Canvas新增方法_zoom_children来实现对 Place 布局的 tkinter 控件的缩放 -
Introduce the optional third-party package
pillowand add a new classPhotoImageintoolbox.enhancedto improve image scaling performance
引入可选的第三方包pillow并在toolbox.enhanced新增类PhotoImage以提高图片缩放的性能 -
Introduce an optional third-party package
matplotliband add a new modulempltotoolboxto achieve compatibility withmatplotlibrelated interfaces
引入可选的第三方包matplotlib并在toolbox中新增模块mpl来实现对matplotlib相关接口的兼容 -
toolbox.toolsadds the functionget_hwndto fetch the HWND of the widget
toolbox.tools新增函数get_hwnd来实现控件的 HWND 的获取 -
toolbox.toolsadds a new functionembed_windowto embed a widget into another widget, which only works on Windows
toolbox.tools新增函数embed_window来将一个控件嵌入到另外一个控件中,仅在 Windows 系统中有效 -
toolbox.toolsadds a new functionscreen_sizeto get the width and height of the screen
toolbox.tools新增函数screen_size来获取屏幕的宽度和高度 -
toolbox.toolsadds a new functionset_mouse_positionto set the mouse position, which only works on Windows
toolbox.tools新增函数set_mouse_position来设置鼠标的位置,仅在 Windows 系统中有效 -
toolbox.toolsadds a new function_forward_methodsto implement the forwarding of class methods
toolbox.tools新增函数_forward_methods来实现类方法的转发 -
Introduce optional third-party packages
pywinstyles,win32materialandhPyT, and add many new parameters tostyle.manager.customize_windowto implement the corresponding interfaces
引入可选的第三方包pywinstyles、win32material和hPyT并在style.manager.customize_window新增许多参数来实现对应的接口
🔴 Removed / 移除
-
Remove function
color.rgb._str_to_hex, this function is useless
移除函数color.rgb._str_to_hex,此函数无用 -
Remove class
core.containers.Dialog, this class is useless
移除类core.containers.Dialog,此类无用 -
Removed the class
core.containers.ChildWindowand there is a better way to replace it
移除类core.containers.ChildWindow,已有其它更好的替换方式 -
Remove redundant code from
three.enginein preparation for the next refactoring
移除three.engine中的冗余代码,为下个版本重构做准备
🟡 Changed / 变更
-
animation.animations.Gradientrenamed toGradientItem
animation.animations.Gradient更名为GradientItem -
The value of
core.constants.SIZEhas been changed from -24 to -20 (a value close to the system text size)
core.constants.SIZE的值从 -24 更改为 -20(与系统文本大小接近的值) -
The default size of most widgets has been reduced to accommodate the font size change
大部分控件的默认大小缩小了,以配合字体大小的变更 -
style.themeis renamed tomanagerto avoid having the same name as the theme folder
style.theme更名为manager,避免跟主题文件夹 theme 重名 -
The rules for storing theme files have been completely changed, as shown in the module docstring for
style.parser
主题文件存放规则完全更改,具体见style.parser的模块文档字符串 -
style.theme.custom_windowrenamed tostyle.manager.customize_window
style.theme.custom_window更名为style.manager.customize_window -
three.engine.Siderenamed tothree.engine.Plane
three.engine.Side更名为three.engine.Plane
🔵 Optimized / 优化
- Now the third-party package
darkdetectis no longer required, but optional. When this package is missing, some features will be unavailable
现在第三方包darkdetect不是必需的了,而是可选的。当缺少此包,将导致部分功能不可用
🟣 Fixed / 修复
-
Fixed some incorrect docstrings
修正了部分错误的文档字符串 -
Fixed an issue where the subject response event was not removed when the window was closed
修复了窗口关闭时未删去主题响应事件的问题 -
Fixed an issue where the widget style did not change completely in some cases when the widget was disabled
修复了控件禁用时,部分情况下控件样式未完全更改的问题
🟤 Refactored / 重构
-
core.virtualrefactoring to remove redundant code and optimize existing code
core.virtual重构,删去冗余代码,优化已有代码 -
stylerefactored
style重构
🔖 3.0.0.beta2¶
🕓 Release Date / 发布日期 : 2024-06-03
🟢 Added / 新增
-
The docstrings for a portion of the code has been added
添加了一部分代码的文本字符串 -
Modules have added a special variable
__all__
模块都增加了特殊变量__all__ -
Subpackage
colorAdded modulehslto support HSL color coding
子包color新增模块hsl以支持 HSL 颜色码 -
The submodule
constantsadds the functionresetto reset all constants to default
子模块constants新增函数reset来重置所有常量为默认值 -
The submodule
themeof the sub-packagestylehas added the functionset_color_themeto use the external theme
子包style的子模块theme新增函数set_color_theme来使用外部主题 -
Added subpackage
toolboxand functionload_fontto introduce external font files
新增子包toolbox以及函数load_font来引入外部字体文件 -
Submodule
enhancedof sub-packagetoolboxadds classPhotoImage
子包toolbox的子模块enhanced新增类PhotoImage -
The submodule
toolsclass_Triggerhas been further enhanced by the addition of methodslockandunlockand related properties
子模块tools的类_Trigger新增方法lock和unlock以及相关属性,来进一步增强它的功能 -
The submodule
imageshas added a classStillImageto support png type static images
子模块images新增类StillImage来支持 png 类型的静态图片 -
Virtual Picture Base Class
virtual.Imageimplements the relevant methods
虚拟图片基类virtual.Image实现了相关方法 -
The virtual widget base class
virtual.Widgetadded new methodsappearanddisappearto hide and reproduce the widget as a whole
虚拟控件基类virtual.Widget新增了方法appear和disappear来实现控件整体的隐藏和再现
🟡 Changed / 变更
-
The classes
Message,ColorChooser, andFontChooserof the submoduledialogshave been renamedTkMessage,TkColorChooser, andTkFontChooser, respectively
子模块dialogs的类Message、ColorChooser和FontChooser分别更名为TkMessage、TkColorChooser和TkFontChooser -
The function
tkintertools.style.theme.use_themeis renamed toset_color_mode
函数tkintertools.style.theme.use_theme更名为set_color_mode -
The rotation event of the class
Spaceof the subpackthreehas been changed from the original left-mouse button to the middle mouse button
子包three的类Space的旋转事件由原来的鼠标左键触发更改为鼠标中键触发
🔵 Optimized / 优化
-
Optimized the implementation of the function
custom_windowof the submodulethemeto prevent it from taking effect in some cases
优化了子模块theme的函数custom_window的实现方式,防止某些情况下无法生效 -
All container widgets have been optimized to prevent the functionality from working under certain conditions
所有容器控件都得到了优化,防止某些条件下会出现相关功能未生效的情况 -
All virtual widgets are perfected with initialization parameters
所有虚拟控件都完善了初始化参数
🟤 Refactored / 重构
-
Core code refactoring, from module
core.pyto sub-packagecore
核心代码重构,由模块core.py重构为子包core -
Subpackage
threerefactoring
子包three重构
🔖 3.0.0.beta1¶
🕓 Release Date / 发布日期 : 2024-05-17
🟢 Added / 新增
-
The docstrings for a portion of the code has been added
添加了一部分代码的文本字符串 -
Added the animation class
MoveItemto move items on the canvas
增加了动画类MoveItem来移动画布上的 Item -
The animation base class
Animationadds the initialization parameterderivationto control whether the parameters of the callback function are derived
动画基类Animation增加了初始化参数derivation来控制回调函数的参数是否求导 -
The subpackage
coloradds the modulecolormapto speed up the conversion of color names to their corresponding RGB codes
子包color增加了模块colormap来加速颜色名称到其对应 RGB 码的转换速度 -
The subpackage
coloradds the functionscontrast,convert,blendandgradientto complete the color processing mechanism
子包color新增函数contrast、convert、blend和gradient来完善颜色处理机制的功能 -
The subpackage
styleadds the modulethemeto control the overall theme of the application
子包style新增模块theme来控制应用程序整体的主题 -
Added method
disabledto the widget class to disable it. If a style with a disabled state is defined in the stylesheet, the defined style is used, otherwise the style in the disabled state is automatically generated based on the current style (color to background color conversion by a factor of 0.618)
控件类新增方法disabled来使其处于禁用状态。若在样式表中定义了禁用状态的样式,则会使用定义的样式,否则根据当前样式自动生成禁用状态的样式(色彩向背景色转换 0.618 倍) -
The widget
RadioButtonhas a new initialization parameterdefaultto control its default state
控件RadioButton新增初始化参数default来控制其默认的状态 -
Experimental support for color strings in RGBA format has been added to the Color subpackage
颜色子包新增对 RGBA 格式的颜色字符串的实验性支持
🟣 Fixed / 修复
-
Fixed an bug where the animation classes
MoveWidgetandMoveComponentwere not moving objects to the correct position when they were called repeatedly
修复了动画类MoveWidget和MoveComponent在被反复调用的情况下无法将对象移动到正确位置的问题 -
Fixed an bug where the animation class
ScaleFontSizedid not scale the font size correctly
修复了动画类ScaleFontSize无法正确缩放字体大小的问题 -
Fixed and enhanced a bug with the centering function of container widgets such as
Toplevel
修复并增强了容器控件Toplevel等在居中功能上的问题
🔵 Optimized / 优化
-
Optimized the way to get the style file, the widget can set a relative name to reduce the amount of code, and the relative name starts with a decimal point
优化了样式文件的获取方式,小组件可以设置相对名称来减少代码量,相对名称以小数点开头 -
The theme mechanism is optimized, there is no longer a need to write a tag in the style file, and the mapping relationship between the color parameters of the item and the keywords of the style file can be written in the definition of
Shape, so as to reduce the redundant content in the style file and improve the compatibility between the style files
主题机制优化,样式文件中不再需要写出 tag,可在Shape的定义中写明 Item 的颜色参数与样式文件关键字的映射关系,以此缩减样式文件中的冗余内容,提高各样式文件之间的兼容性 -
Optimized the appearance of some widgets
优化部分控件外观 -
Improved cross-platform compatibility
提高了跨平台的兼容性 -
Improved 3D submodule compatibility with the new version of
tkintertools
提高了 3D 子模块对新版tkintertools兼容性 -
Change the constants
FONTandSIZEto dynamic values, so that font modifications can take effect globally
将常量FONT和SIZE改成动态取值,便于字体修改可以全局生效
🟡 Changed / 变更
-
The animation class
Gradientno longer converts an empty color string to black when it accepts it, but simply throws an exception
动画类Gradient在接受空颜色字符串时不再将其转化为黑色,而是直接抛出异常 -
The implementation code for the 3D subpackage has been moved from file
three/__init__.pyto filethree/engine.py
3D 子包的实现代码从文件three/__init__.py移动到了文件three/engine.py -
The submodule
stylehas been changed to the sub-packagestyleand its contents have been reorganized
子模块style变更为子包style,其内容进行了重新的整理
🔴 Removed / 移除
-
Remove the useless class from the submodule
imagesof the subpackagestandard
移除子包standard的子模块images中无用的类 -
Remove the function
colorfrom the color subpack (There are other better implementations)
移除颜色子包中的函数color(已有其他更好的实现)
🟤 Refactored / 重构
- Some of the code has been refactored
重构了部分代码
🔖 3.0.0.alpha7¶
🕓 Release Date / 发布日期 : 2024-05-05
🟤 Refactored / 重构
-
Introducing a pure Python-based third-party module,
darkdetect, to implement theme dynamic following system and multi-OS dark theme support
引入纯 Python 实现的第三方模块darkdetect,以实现主题动态跟随系统以及多操作系统暗黑主题的支持 -
Added text class widget
新增文本类控件 -
Fixed a few bugs and added a lot of content to the framework
修复些许 bug,框架内增加大量内容 -
Some basic dialogs have been added
增加了部分基本对话框
🔖 3.0.0.alpha6¶
🕓 Release Date / 发布日期 : 2024-04-30
🟤 Refactored / 重构
-
The framework has been further upgraded to allow you to build widgets for complex elements
框架进一步升级,可以构建复杂元素的控件了 -
A lot of bugs have been fixed, and a lot of content has been improved within the framework
修复大量 bug,框架内完善大量内容 -
The animation sub-module has been added to build high-precision and complex animations
新增动画子模块,可以构建高精度复杂动画了 -
Color gradient animations are added to widgets, and special animations are added to some widgets, such as switch switches
控件增加颜色渐变动画,部分控件增加特殊动画,如开关切换等 -
Some widgets have been improved
完善部分控件
🔖 3.0.0.alpha5¶
🕓 Release Date / 发布日期 : 2024-04-16
🟤 Refactored / 重构
-
The framework has been upgraded to allow you to build multi-element widgets
框架升级,可以构建多元素的控件了 -
A lot of bugs have been fixed, and a lot of content has been improved within the framework
修复大量 bug,框架内完善大量内容 -
The theme binding method has been changed to improve the degree of automation, free hands as much as possible, and reduce the amount of code for users
主题绑定方式更改,提高自动化程度,尽可能解放双手,减少用户的代码量 -
UI evolution to reduce aliasing and improve clarity
UI 进化,减小锯齿感,提升清晰度 -
Some standard widgets have been added
增加部分标准控件
🔖 3.0.0.alpha4¶
🕓 Release Date / 发布日期 : 2024-04-05
🟤 Refactored / 重构
-
The 3D submodule of
tkintertools 2was successfully ported totkintertools 3
成功将tkintertools 2的 3D 子模块移植到tkintertools 3上 -
A lot of bugs have been fixed, and a lot of content has been improved within the framework
修复大量 bug,框架内完善大量内容 -
Added a theme mechanism that allows two sets of themes that can be switched between light and dark
新增主题机制,允许明暗两套可切换的主题 -
The UI has been updated to provide both Windows 10 and Windows 11 style dark and bright themes
UI 更新,提供 Windows 10 和 Windows 11 风格的暗黑与明亮两套主题 -
Highly customizable widgets are now available
可高度定制化控件了
🔖 3.0.0.alpha3¶
🕓 Release Date / 发布日期 : 2024-02-20
🟤 Refactored / 重构
-
Fixed a few bugs and added a lot of content to the framework
修复些许 bug,框架内增加大量内容 -
The designer is in development mode
设计器已进入开发状态
🔖 3.0.0.alpha2¶
🕓 Release Date / 发布日期 : 2024-02-18
🟤 Refactored / 重构
-
Fixed a few bugs and added a lot of content to the framework
修复些许 bug,框架内增加大量内容 -
Added some widgets
新增一些控件 -
The background color of the container widget automatically follows the parent widget
容器控件的背景色自动跟随父控件
🔖 3.0.0.alpha1¶
🕓 Release Date / 发布日期 : 2024-02-17
🟤 Refactored / 重构
-
The widget framework has been built, the details are not yet completed, and some widgets have been built for testing
控件框架搭建完成,细节部分还未完成,已构建部分控件用于测试 -
Customizable widgets are now available
可定制化控件了 -
Fixed a few bugs and added a lot of content to the framework
修复些许 bug,框架内增加大量内容 -
Improved
Canvas’s scaling mechanism
完善了Canvas的缩放机制 -
Added some widgets
新增一些控件
🔖 3.0.0.dev9¶
🕓 Release Date / 发布日期 : 2023-02-16
🟤 Refactored / 重构
- The widget framework is almost complete, and the details are not yet complete
控件框架基本完成,细节部分还未完成
🔖 3.0.0.dev8¶
🕓 Release Date / 发布日期 : 2023-02-15
🟤 Refactored / 重构
- Container widget
tkintertools.Canvashas completed support fortkinter._CanvasItemId, as well as a host of other improvements
容器控件tkintertools.Canvas已完成对tkinter._CanvasItemId的支持,以及其它大量改进
🔖 3.0.0.dev7¶
🕓 Release Date / 发布日期 : 2023-02-04
🟤 Refactored / 重构
- Container widget
tkintertools.Canvashas been adapted to three layouts:Pack,Place, andGrid, withPlacebeing strengthened
容器控件tkintertools.Canvas已完成对三种布局方式Pack、Place和Grid的适配,其中Place被加强
🔖 3.0.0.dev6¶
🕓 Release Date / 发布日期 : 2024-01-19
🟤 Refactored / 重构
-
The window nesting feature is added under the Windows platform
Windows 平台下新增窗口嵌套功能 -
Added controls for window border color, title bar background color, and title bar foreground color under the Windows platform
Windows 平台下新增对窗口边框颜色、标题栏背景色和标题栏前景色的控制
🔖 3.0.0.dev5¶
🕓 Release Date / 发布日期 : 2023-09-26
🟤 Refactored / 重构
- Basic functions are being refactored…
基本功能重构中……
🔖 3.0.0.dev4¶
🕓 Release Date / 发布日期 : 2023-09-24
🟤 Refactored / 重构
- Basic functions are being refactored…
基本功能重构中……
🔖 3.0.0.dev3¶
🕓 Release Date / 发布日期 : 2023-09-21
🟤 Refactored / 重构
- Basic functions are being refactored…
基本功能重构中……
🔖 3.0.0.dev2¶
🕓 Release Date / 发布日期 : 2023-09-21
🟤 Refactored / 重构
- Basic functions are being refactored…
基本功能重构中……
🔖 3.0.0.dev1¶
🕓 Release Date / 发布日期 : 2023-09-20
🟤 Refactored / 重构
- Basic functions are being refactored…
基本功能重构中……
🔖 3.0.0.dev0¶
🕓 Release Date / 发布日期 : 2023-09-19
🟤 Refactored / 重构
- Start a refactoring of the new version of
tkintertools 3to solve the problems that can’t be solved intkintertools 2and bring more and better features!
开启全新版本tkintertools 3的重构,以解决tkintertools 2中无法解决的问题,并带来更多更棒的功能!
🔖 2.6.21¶
🕓 Release Date / 发布日期 : 2024-01-01
🟡 Changed / 变更
- The class
Textin submoduletools_3dwas renamedText3Dto distinguishTextinmain
子模块tools_3d中的类Text更名为Text3D以区分main中的Text
🔵 Optimized / 优化
- Improved Type Hints
完善了类型提示
🟣 Fixed / 修复
-
Fixed a bug where the parameter
proportionof the functioncolorwas invalid
修复了函数color的参数proportion失效的问题 -
Fixed a bug where the
configureparameter of theSwitchclass was incorrect
修复了类Switch的方法configure参数取值错误的问题
🔴 Removed / 移除
Animationhas removed thecolorparameter (can be implemented with thecallbackparameter)
动画类Animation移除了参数color(可用参数callback代替实现)
🔖 2.6.20¶
🕓 Release Date / 发布日期 : 2023-12-26
🔵 Optimized / 优化
-
The pause and resume functionality of the image class
PhotoImageis encapsulated in the methodspauseandplay
图片类PhotoImage的暂停和继续播放功能被封装为方法pause和play -
Optimized the way the
PhotoImageclass gets the total number of frames of a gif image, and now you can get the total number of frames by methodget_total_frames
优化类PhotoImage获取 gif 图片总帧数的方式,现在可以通过方法get_total_frames得到总帧数 -
The
colorfunction no longer manually obtains a gradient with a specified regularity, but instead specifies a control function through the parametercontroller
函数color不再通过手动方式得到指定规律的渐变色,而是通过参数controller指定一个控制函数
🟡 Changed / 变更
-
The original method of
playused forPhotoImageto start playback has been renamed tostartto avoid conflicts with the method ofplayto continue playback
图片类PhotoImage原来用于开始播放的方法play更名为start避免与继续播放的方法play起冲突 -
The constant
CONTROLwas renamedCONTROLLER
常量CONTROL更名为CONTROLLER
🟣 Fixed / 修复
- Fixed some incorrect type hints
修复了一些错误的类型提示
🔖 2.6.19¶
🕓 Release Date / 发布日期 : 2023-12-17
🟣 Fixed / 修复
- Fixed a bug where GIFs could not be played
修复 gif 动图无法播放的问题
🔵 Optimized / 优化
-
PhotoImagehas optimized the mechanism of playing GIFs, and if there is no pre-parsing before playback, it will be automatically parsed during playback
图片类PhotoImage关于播放 gif 动图的机制得到优化,若播放前没有预解析,则会自动进行播放时解析 -
Some codes have been optimized
优化了部分代码
🔖 2.6.18¶
🕓 Release Date / 发布日期 : 2023-12-10
🟣 Fixed / 修复
- Fixed a bug where the actual font size of 3D text with the same font size setting was inconsistent in different locations
修复在不同位置的但字体大小设定相同的 3D 文本的实际字体大小不一致的 bug
🟡 Changed / 变更
- Class
Canvas_3Dwas renamedCanvas3D, and Class_3D_Objectwas renamed to_Object3D
类Canvas_3D更名为Canvas3D,类_3D_Object更名为_Object3D
🔵 Optimized / 优化
- Some codes have been optimized
优化了部分代码
🔖 2.6.17¶
🕓 Release Date / 发布日期 : 2023-12-07
🔵 Optimized / 优化
- Corrected some incorrect English words
修改了部分错误的英文单词
🟡 Changed / 变更
-
The font unit changes from points to pixels
字体单位由磅更改为像素 -
Reduced the display position offset of tooltip widgets
减小了提示框控件的显示位置偏移
🟣 Fixed / 修复
-
Fixed a bug where tooltip widgets could appear in very wrong places
修复了提示框控件有可能显示在非常错误的位置的问题 -
Fixed a bug where the widget class
Entrywas in a non-centered state and the canvas was shrunk, entering an endless loop when entering text, causing the window to not respond
修复了控件类Entry在非居中状态,且画布缩小之后,输入文本时进入死循环,导致窗口未响应的问题 -
Fixed a bug where widget color properties were sometimes unchangeable
修复了控件颜色属性某些时候不可更改的问题
🔖 2.6.16¶
🕓 Release Date / 发布日期 : 2023-12-01
🟢 Added / 新增
- The
ToolTipclass has added adelayparameter to enhance functionality
类ToolTip新增参数delay来增强功能
🔵 Optimized / 优化
- The function
askfonthas been optimized so that the font selection dialog can now be opened without the need for a parent container widget
对函数askfont进行了优化,现在无需父容器控件也可以打开字体选择对话框
🟡 Changed / 变更
- The values of some constants have been modified
部分常量的值进行了修改
🔴 Removed / 移除
- Removed the function
SetProcessDpiAwarenessand the constantPROCESS_SYSTEM_DPI_AWARE
移除函数SetProcessDpiAwareness和常量PROCESS_SYSTEM_DPI_AWARE
🟣 Fixed / 修复
-
Fixed the bug that the font size of the menu bar was abnormal
修复菜单栏字体大小异常的问题 -
Fixed the bug that images could not be loaded
修复图片无法加载的问题
🔖 2.6.15¶
🕓 Release Date / 发布日期 : 2023-11-26
🟢 Added / 新增
-
A new method for the
Animationclass is calledshutdownto terminate the current animation
类Animation新增方法shutdown来终止当前动画 -
The geometry class
Cuboidand the geometry classTetrahedronof submoduletools_3dhave been initialized to increase the degree of freedom in style configuration
子模块tools_3d的类Cuboid和类Tetrahedron新增一些初始化参数来提高样式配置的自由度 -
The constants
TCL,PROPORTION,SEQLENGTH, andNUMare added
新增常量TCL、PROPORTION、SEQLENGTH和NUM -
The
colorfunction adds the parametersseqlengthandnumto enhance the functionality
函数color新增参数seqlength和num来增强功能
🔵 Optimized / 优化
-
The parameter support for the function
colorhas been expanded to support color names such as red, skyblue, and cyan2
函数color的参数支持的范围扩大,可以支持诸如 red、skyblue 和 cyan2 等颜色名称 -
Some functions can be called without the need for a parent widget
部分函数无需父控件即可调用
🟣 Fixed / 修复
- Fixed a bug where the function
colorwould get an incorrect result in rare cases
修复了函数color在罕见情况下会得到错误结果的问题
🔖 2.6.14¶
🕓 Release Date / 发布日期 : 2023-11-17
🟢 Added / 新增
- The
CheckButtonwidget class adds afontparameter to modify its font
控件类CheckButton新增参数font来修改其字体
🟡 Changed / 变更
-
Modify the name of some color constants and the parameters related to some colors
修改部分颜色常量的名称和部分颜色相关的参数 -
The widget class
Progressbaris renamed toProgressBar
控件类Progressbar更名为ProgressBar
🟣 Fixed / 修复
-
Fixed the bug that the color of the
Switchof the widget class was displayed incorrectly
修复控件类Switch颜色显示错误的问题 -
Fixed a bug where the initial color of the
CheckButtonof the widget class would not be displayed immediately
修复控件类CheckButton初始颜色不会立刻显示的问题 -
Fixed the bug that the text style of the widget class
Entrywas not updated after calling the methodset
修复控件类Entry在调用方法set之后文本样式没有更新的问题
🔖 2.6.13¶
🕓 Release Date / 发布日期 : 2023-11-17
🟢 Added / 新增
-
The submodule
tools_3dadds markup text-related functions and corresponding parameters to the classPoint:markuptext,markupdelta,markupfont,markupfill, andmarkupjustify
子模块tools_3d的类Point新增标记文本相关功能以及对应参数:markuptext、markupdelta、markupfont、markupfill和markupjustify -
Submodule
tools_3dadds a new classTextto implement 3D text that is always facing us (unlike markup text, which has a zoom function)
子模块tools_3d新增类Text来实现始终朝向我们的 3D 文本(与标记文本不同,其有缩放功能)
🟡 Changed / 变更
-
The class
Switchhas been partially refactored from a stand-alone class to a subclass that inherits from the base classBaseWidget, and a number of methods have been added that are compatible withBaseWidget
类Switch部分重构,由独立类变更为继承基类BaseWidget的子类,添加了许多和BaseWidget兼容的方法 -
Change the main code file name to main.py to avoid occupying the special file name __main__.py
修改主代码文件名称为 main.py,避免占用特殊文件名 __main__.py
🟣 Fixed / 修复
- Fixed a bug where submodule
tools_3dwas reversed on Z coordinates, i.e., changing the spatial coordinate system from a left-handed coordinate system to a right-handed coordinate system
修复子模块tools_3d在 Z 坐标上正负颠倒的问题,即,将空间坐标系由左手坐标系改为右手坐标系
🔖 2.6.12¶
🕓 Release Date / 发布日期 : 2023-11-15
🟢 Added / 新增
-
Widget class
CheckButtonadds parametertickto change its markup symbol
控件类CheckButton新增参数tick来改变其标记符号 -
The
Switchwidget class adds parameterscolor_fill_sliderandcolor_outline_sliderto change the appearance of its internal sliders
控件类Switch新增参数color_fill_slider和color_outline_slider来更改其内部滑块的外观
🔵 Optimized / 优化
-
Drastically changed the format of the docstring to solve the problem that the docstring was displayed out of order on PyCharm
大幅度修改 docstring 的格式,以解决 docstring 在 PyCharm 上格式显示错乱的问题 -
Remove redundant code
移除冗余代码 -
Optimized
tools_3dsubmodule code to improve performance by 13.26%
优化了tools_3d子模块代码,提高了 13.26% 的性能
🟣 Fixed / 修复
-
Fixed a bug where when clicking on a widget, the widget behind it would also be triggered
修复了点击控件时,其后面的控件也会被触发的问题 -
Missing symbol ‘#’ for function
colorreturn value
函数color返回值缺少符号 “#” -
Fixed a bug where the canvas of the
tools_3dsubmodule could not use widgets such as buttons
修复tools_3d子模块的画布无法使用按钮等控件的问题 -
Fixed a bug where the
Switchof the Widget class could not control theSwitchby clicking on the inner slider
修复了控件类Switch点击内部滑块无法操控Switch的问题
🔖 2.6.11¶
🕓 Release Date / 发布日期 : 2023-10-17
🔵 Optimized / 优化
- Optimized the code of submodule
tools_3d, introduced built-in modulearrayinstead of the underlying list to improve the calculation speed, and improved the overall performance by 11.66% !
优化了子模块tools_3d的代码,引入内置模块array代替底层列表来提高计算速度,综合性能提升 11.66% !
🔴 Removed / 移除
- Removed classes
_Point,_Lineand_Sidefrom submoduletools_3d
移除了子模块tools_3d中的类_Point、_Line和_Side
🔖 2.6.10¶
🕓 Release Date / 发布日期 : 2023-08-12
🟢 Added / 新增
-
Added file exceptions.py and exception classes
ScaleArgsValueError,ColorArgsValueErrorandWidgetStateModeErrorto provide a description of some exceptions
新增文件 exceptions.py 及异常类ScaleArgsValueError、ColorArgsValueError和WidgetStateModeError以提供部分异常的描述 -
The widget
Progressbaradds a indeterminate mode
控件Progressbar新增不定模式
🟡 Changed / 变更
-
The value of the constant
SWITCH_WIDTHis changed from 0 to 60
常量SWITCH_WIDTH的值从 0 更改为 60 -
The parameter
widthof classSwitchwas changed from positional argument to keyword argument
类Switch的参数width由位置参数更改为关键字参数
🔵 Optimized / 优化
-
Change the way the output is formatted in all code from the “%” mode to the more efficient f-string mode
将所有代码中格式化输出的方式由 “%” 方式更改为效率更高的 f-string 方式 -
Optimized type hints for some code
优化了部分代码的类型提示
🔴 Removed / 移除
- Remove the function
textand use f-string instead
移除函数text,可使用 f-string 来对其进行代替
🔖 2.6.9¶
🕓 Release Date / 发布日期 : 2023-08-09
🟢 Added / 新增
-
Added new widget switch (
Switch)
新增控件开关(Switch) -
Added widget Tip (
ToolTip) and all virtual widgets added the parametertooltip
新增控件提示框(ToolTip),且所有虚拟控件新增参数tooltip -
Added constants
DURATION、TOOLTIP_FG、TOOLTIP_BG、TOOLTIP_HIGHLIGHT_THICKNESS、TOOLTIP_HIGHLIGHT_BACKGROUND、COLOR_SWITCH_ON、COLOR_SWITCH_OFF、SWITCH_WIDTH、SWITCH_HEIGHT、SWITCH_RADIUSandSWITCH_ANIMATION_MS
新增常量DURATION、TOOLTIP_FG、TOOLTIP_BG、TOOLTIP_HIGHLIGHT_THICKNESS、TOOLTIP_HIGHLIGHT_BACKGROUND、COLOR_SWITCH_ON、COLOR_SWITCH_OFF、SWITCH_WIDTH、SWITCH_HEIGHT、SWITCH_RADIUS和SWITCH_ANIMATION_MS
🟣 Fixed / 修复
-
Fixed an issue where the text class widget called method
clearwas invalid
修复了文本类控件调用方法clear无效的问题 -
Fixed an issue where the class
Animationautomatically determined the parent widget of the widget to be moved
修复了类Animation自动确定待移动控件的父控件时出现错误的问题
🟡 Changed / 变更
- The positional parameter
lengthof classCheckButtonwas renamedheight
类CheckButton的位置参数length更名为height
🔵 Optimized / 优化
- Optimized the method
wm_geometryof classTkto accommodate some specially formatted parameters
优化了类Tk的方法wm_geometry以适应某些特殊格式的参数
🔴 Removed / 移除
- Removed class
Singletonand functionmove
移除了类Singleton和函数move
🔖 2.6.8¶
🕓 Release Date / 发布日期 : 2023-08-03
🟢 Added / 新增
-
If the user’s Python includes a PIL library, PIL is automatically invoked when autoscaling images to extend the functionality of the class
PhotoImage
若使用者的 Python 包含有 PIL 库,则在自动缩放图片时自动调用 PIL 来扩展类PhotoImage的功能 -
Added class
Animationto achieve more efficient, convenient and functional animation effects
新增类Animation来实现更加高效、更加方便和功能性更强的动画效果 -
Added constant
CONTROL
新增常量CONTROL
🟣 Fixed / 修复
- Fixed the bug that widgets
EntryandTextwould report an error when pasting text
修复控件Entry和Text粘贴文本时会报错的 bug
🟡 Changed / 变更
-
Modified the name of the constant
FRAMEStoFPS
修改常量FRAMES的名称为FPS -
The parameter
precisionof the methodzoomof classPhotoImagewas changed from positional argument to keyword argument
类PhotoImage的方法zoom的参数precision由位置参数变更为关键字参数
🟠 Deprecated / 弃用
-
The function
moveis about to be deprecated, please replace it with the new classAnimation
函数move即将被弃用,请用新类Animation来代替 -
The class
Singletonis about to be deprecated and singleton mode classes will no longer be available in subsequent releases
类Singleton即将被弃用,后续版本中将不再提供单例模式类
🔖 2.6.7¶
🕓 Release Date / 发布日期 : 2023-07-06
🟢 Added / 新增
-
The function
rotateof the 3D submodule adds the keywordaxisto provide the function of rotating around the axis
3D 子模块的函数rotate新增关键字参数axis来提供绕轴旋转的功能 -
Added constants
ROTATE_CENTER,ORIGIN_COORDINATE,ORIGIN_SIZE,ORIGIN_WIDTH,ORIGIN_FILLandORIGIN_OUTLINE
新增常量ROTATE_CENTER、ORIGIN_COORDINATE、ORIGIN_SIZE、ORIGIN_WIDTH、ORIGIN_FILL和ORIGIN_OUTLINE -
Class
TkandToplevelAdded keyword argumentsalpha,toolwindow,topmostandtransparentcolor
类Tk和Toplevel新增关键字参数alpha、toolwindow、topmost和transparentcolor
🟣 Fixed / 修复
- Fixed a bug where the class
Textwould report an error when scrolling with the mouse wheel
修复了类Text在使用鼠标滚轮滚动时会报错的 bug
🔵 Optimized / 优化
-
Optimized some code and type hints
优化了部分代码和类型提示 -
Optimized the internal implementation of the functions
translateandscaleto improve performance
优化函数translate、rotate和scale内部的实现,提高了性能 -
A large number of incomplete docstrings have been modified and improved
修改和完善了大量的不完整的文档注释
🟡 Changed / 变更
- Change some methods of some classes to protection methods
将部分类的部分方法更改为保护方法
🔴 Removed / 移除
- Removed abstract classes and abstract methods
移除了抽象类和抽象方法
🔖 2.6.6¶
🕓 Release Date / 发布日期 : 2023-07-01
🟢 Added / 新增
-
The classes
_Point,_Line,_Side, andGeometryof the 3D submodule all have a new methodcenterthat returns the geometric center of the 3D object
3D 子模块的类_Point、_Line、_Side和Geometry都新增一个方法center返回该 3D 对象的几何中心 -
Added abstract class
_3D_Objectas the metabase class for classes_Point,_Line, and_Side
新增抽象类_3D_Object来作为类_Point、_Line和_Side的元基类
🔵 Optimized / 优化
-
Optimized parameter passing in 3D submodules, users do not need to ensure the transitivity of
listat all times, and parameters that used to only use thelisttype are nowIterabletype
优化了 3D 子模块中的参数传递,使用者不需要时刻保证list的传递性,且原来只能使用list类型的参数现在为Iterable类型 -
The way 3D objects are centered in the 3D submodule has changed, which has improved performance and reduced the amount of code
3D 子模块中 3D 对象居中方式改变,相比原来性能提升了不少,代码量也减少了 -
Corrected some incorrect type hints and improved some missing method comments
改正了部分错误的类型提示,完善了部分缺少的方法注释 -
In the 3D submodule, the distance between two points was originally calculated with the function
hypot, and now the functiondistis used directly to calculate the Euclidean distance between two points to improve performance
3D 子模块中原来用函数hypot计算两点间距离,现在直接用函数dist计算两点间欧几里得距离,提高性能 -
The position display of widgets of class
Pointhas been optimized in the 3D submodule so that it is always at the forefront
3D 子模块中优化了类Point的控件位置显示,让其始终保持在最前 -
The calculation formula for the camera distance in the 3D submodule has been optimized to improve the performance by a bit
3D 子模块中相机距离的计算公式优化,提高了一点性能
🟡 Changed / 变更
-
The parameters
point1andpoint2of classPointof the 3D submodule and its parent class_Pointwere renamed topoint_startandpoint_endrespectively
3D 子模块的类Point及其父类_Point的参数point1和point2分别被重命名为point_start和point_end -
The parameter
origin_colorof the classSpaceof the 3D submodule has been changed to four new parameters, namelyorigin_size,origin_width,origin_fillandorigin_outline
3D 子模块的类Space的参数origin_color被更改为四个新的参数,分别是origin_size、origin_width、origin_fill和origin_outline
🔴 Removed / 移除
- The classes
Canvas_3DandSpaceof the 3D submodule remove the parametersdxanddy, and the default field of view of the canvas remains centered, i.e. their center is now the original upper-left vertex
3D 子模块的类Canvas_3D和Space移除参数dx和dy,画布默认视野保持居中,也就是说,现在它们的中心位置才是原来的左上角顶点
🔖 2.6.5¶
🕓 Release Date / 发布日期 : 2023-06-17
🟢 Added / 新增
- The new class
Spaceadded to the submoduletools_3dcan provide the ability to translate, rotate and scale 3D objects
子模块tools_3d新增类Space可以提供对 3D 对象进行平移、旋转和缩放等操作的功能
🟣 Fixed / 修复
-
Fixed a bug where class
Cuboidand classTetrahedrondid not add instances to parent classCanvas_3D
修复了类Cuboid和类Tetrahedron没有将实例添加到父类Canvas_3D的 bug -
Fixed a bug where an error was displayed when a 3D object appeared behind the camera position
修复了当 3D 对象出现在相机位置后面时会显示错误的 bug -
Fixed some incorrect type hints
修复了部分错误的类型提示
🔴 Removed / 移除
- Removed the constant
BACKGROUNDand no longer qualified the default background color of classCanvas
移除常量BACKGROUND并且不再对类Canvas的默认背景颜色做限定
🔖 2.6.4¶
🕓 Release Date / 发布日期 : 2023-06-12
🟢 Added / 新增
- The class
tool_3dsubmoduleCanvas_3Dhas added the functionspace_sortto calculate and sort the actual position of space to support the correct display of geometry colors
tool_3d子模块的类Canvas_3D新增对空间实际位置进行计算和排序的函数space_sort,以支持几何体颜色的正确显示
🟣 Fixed / 修复
-
Fixed a bug where movement and rotation between points, lines, and sides in the 3D module are out of sync
修复 3D 模块中的点、线与面之间移动和旋转不同步的 bug -
Fixed a bug where class
Canvas_3Din the 3D module would be invalid when passing arguments to classCanvasin the originaltkintermodule
修复 3D 模块中的类Canvas_3D在传递原tkinter模块中的类Canvas的参数时会无效的 bug
🟡 Changed / 变更
-
The parameter
cfg_3dof classCanvas_3Dis changed to 3 specific parameters, namely camera distancecamera_distance, picture abscissa deviationdxand screen ordinate deviationdy
类Canvas_3D的参数cfg_3d被更改为 3 个具体的参数,分别为相机距离camera_distance、画面横坐标偏差dx和画面纵坐标偏差dy -
In the 3D submodule, the value of the camera distance constant is changed to 1000
3D 子模块中相机距离常量的值更改为 1000 -
Compatibility changes, because Python 3.7 is about to enter the end-of-life stage, and in order to improve program performance, Python3.7 is not compatible, but Python3.8 is compatible
兼容性更改,由于 Python3.7 即将步入 end-of-life 阶段,且为了提高程序性能,现无法兼容 Python3.7,但能够兼容 Python3.8
🔖 2.6.3¶
🕓 Release Date / 发布日期 : 2023-06-07
🔵 Optimized / 优化
-
The 3D object implementation varies with the size of the canvas
3D 对象实现随画布大小变化而变化 -
Make the default value of the corner radius more intelligent, 4 when the system is
Windows11,Linux,Mac, and 0 for the rest
使圆角半径的默认值更加智能,当系统为Windows11、Linux、Mac时为 4,其余情况为 0 -
Added more type hints, especially for overloads
添加了更多类型提示,尤其是对重载的提示
🟣 Fixed / 修复
- Fixed a bug where the parameter
keepwould affect the position of classCanvas
修复参数keep会对类Canvas的位置产生影响的 bug
🟡 Changed / 变更
- Set the default value of the parameter
keepof the classCanvas_3Din the 3D module toTrue, i.e. keep the canvas width and height scaled proportionally by default
将3d模块中的类Canvas_3D的参数keep的默认值设为True,即默认保持画布宽高缩放成比例
🔖 2.6.2¶
🕓 Release Date / 发布日期 : 2023-05-30
🟢 Added / 新增
- Added
tkintertoolssub-moduletools_3dto support drawing 3D graphics
新增tkintertools子模块tools_3d以支持绘制 3D 图形
🔖 2.6.1¶
🕓 Release Date / 发布日期 : 2023-05-21
🔵 Optimized / 优化
-
Enhance the cross platform functionality of the module, which can run on the Windows and Linux platform
提升模块的跨平台性,可在 Windows 和 Linux 平台上运行 -
Optimized reference documentation for classes and functions
优化了类和函数的参考文档 -
Improved module compatibility to Python 3.7
提升模块兼容性,向下兼容至 Python3.7 -
Optimized test files, compatible with different operating systems, and fixed a small number of bugs
优化了测试文件,兼容不同操作系统,修复少量 bug -
Optimize the methods of the widget checkbox
CheckButton
优化控件复选框CheckButton的各项功能 -
The class
Canvasadds parametersxandyto reduce redundant code
类Canvas新增参数x和y以减少多余代码
🟣 Fixed / 修复
- Fixed a bug where widgets would misalign after calling the method
moveto
修复了控件在调用了方法moveto后会发生错位的 bug
🔴 Removed / 移除
- Remove Unused Constants
SCALE
删除无用常量SCALE
🔖 2.6.0¶
🕓 Release Date / 发布日期 : 2023-03-28
🟢 Added / 新增
- New virtual canvas widget check box:
CheckButton
新增虚拟画布控件复选框:CheckButton
🟣 Fixed / 修复
- Solve the bug that the
Textclasssetandappendmethods will not be updated immediately after use
解决Text类set、append方法使用后不会立即更新的 bug
🔵 Optimized / 优化
- Optimize the parameters of some classes and functions
优化部分类和函数的参数
🔖 2.5.12¶
🕓 Release Date / 发布日期 : 2023-03-20
🟢 Added / 新增
- Add a
imageparameter to all widgets to add a background image
所有控件新增参数image来添加背景图片
🟣 Fixed / 修复
- Fixed a bug where the
movefunction cannot move a window
修复move函数无法移动窗口的 bug
🔵 Optimized / 优化
-
Move the binding code of the associated keyboard from class
Tkto classCanvas
将关联键盘的绑定代码全部由类Tk移到类Canvas中 -
Optimized some of the code to prevent bugs that shouldn’t occur
优化了部分代码,防止出现一些不应该出现的 bug
🔴 Removed / 移除
- Deleted function
font
删除了函数font
🔖 2.5.11¶
🕓 Release Date / 发布日期 : 2023-03-13
🟢 Added / 新增
-
Class
Canvasadds parameterkeepto extend function
类Canvas新增参数keep以扩展功能 -
Add the tool function
SetProcessDpiAwarenessto enhance the function
新增工具函数SetProcessDpiAwareness以增强功能 -
New tool function
fontis added to solve the problem of font size matching DPI level
新增工具函数font以解决字体大小适配 DPI 级别的问题
🟣 Fixed / 修复
-
Fixed the problem of inaccurate Python version requirements. The minimum module operation requirement should be Python 3.11
修复 Python 版本要求不准确的问题,模块最低运行要求应为 Python3.11 -
Fixed the problem that the
configuremethod of_BaseWidgetcannot get the normal effect when modifying the parametertextto an empty string
修复了控件基类_BaseWidget的方法configure在将参数text修改为空字符串时无法得到正常效果的问题
🔵 Optimized / 优化
-
Optimize the solution to the adaptive DPI problem
优化解决适配 DPI 问题的方案 -
Optimized the way font size fits DPI
优化了字体大小适配 DPI 的方式 -
The canvas widget will be scaled according to the scale of the canvas when it is placed, rather than after it is placed
画布控件在放置时就会根据画布的缩放而缩放,而不是在放置后才进行缩放
🔖 2.5.10¶
🕓 Release Date / 发布日期 : 2023-02-04
🟢 Added / 新增
-
Canvas virtual widget base class
_BaseWidgetAdd instance attributecommand_exto extend functions
画布虚拟控件基类_BaseWidget新增实例属性command_ex以扩展功能 -
Function
moveadds parameterendto enhance function
函数move新增参数end以增强功能 -
New method of canvas virtual widget base class
moveto
画布虚拟控件基类新增方法moveto
🟣 Fixed / 修复
-
Fixed the bug that the class
Tkcannot make the distance between the window and the screen 0
修复了类Tk无法使窗口与屏幕距离为 0 的 bug -
Fixed the bug that the parameter
borderwidthof the widget is invalid when it has rounded corners
修复了控件在有圆角状态下参数borderwidth失效的 bug
🟡 Changed / 变更
- The initialization parameters of
Tkclass andToplevelclass have become more concise
Tk类和Toplevel类的初始化参数变得更加简洁了
🔵 Optimized / 优化
-
The state change of the canvas virtual widget adds a previous state detection, greatly improving performance
画布虚拟控件的状态改变加了个先前状态检测,大幅提高性能 -
The performance of function
movehas been optimized
函数move的性能得到了优化
🔖 2.5.9¶
🕓 Release Date / 发布日期 : 2023-01-13
🟢 Added / 新增
- Class
PhotoImagenew methodstopis used to stop the playback of moving pictures
类PhotoImage新增方法stop用于停止动图的播放
🟣 Fixed / 修复
-
Fixed an incomplete parameter bug in the
movetomethod of theCanvasclass
修复Canvas类的方法moveto在参数上不完备的 bug -
Fixed a bug that sometimes causes multiple widgets to touch at the same time
修复了有时候会产生多个控件同时触碰的 bug -
Fixed parameter error of class
PhotoImage
修复了类PhotoImage的参数错误
🔵 Optimized / 优化
- Optimize codes, simplify some codes and delete redundant parts
优化代码,简化部分代码,删去冗余部分
🔴 Removed / 移除
- The redundant parameters
minsizeandalphaof theTkandToplevelclasses have been deleted
删除了Tk类和Toplevel类的冗余参数minsize和alpha
🔖 2.5.8¶
🕓 Release Date / 发布日期 : 2023-01-12
🟣 Fixed / 修复
-
Fixed a bug that the function
movecannot perform the default move modeflat
修复了函数move无法进行默认的移动模式flat的 bug -
Solve the bug that the cursor will flash faster and faster after pasting text for text widget
解决文本类控件在粘贴文本后光标会越闪越快的 bug
🔵 Optimized / 优化
-
movefunction has been optimized to improve applicability, accuracy and speed
优化了move函数,提升了适用性、精度以及速度 -
Canvasclass adds compatibility methodscoords,move,movetoandbboxto improve the DPI adaptation problem
Canvas类新增兼容方法coords、move、moveto和bbox,完善了 DPI 的适配问题 -
TkClass Add Methodwm_minsize,wm_maxsizeto be compatible with DPI adaptation problems
Tk类新增方法wm_minsize、wm_maxsize以兼容 DPI 适配问题 -
Optimize the
PhotoImageclass so that it can be used without globalization
优化PhotoImage类,使之无需全局化,即可使用 -
Overall optimization of code and reduction of code volume
总体优化了代码,减少了代码量
🔖 2.5.7¶
🕓 Release Date / 发布日期 : 2023-01-10
🟢 Added / 新增
-
The
movefunction adds the parameterframes, which can change the number of frames of the animation when moving
move函数新增参数frames,可改变移动时的动画的帧数 -
Tkclass adds the adaptation function to screen DPI, which can make the window clearer
Tk类新增对屏幕 DPI 的适配功能,可使窗口更加清晰 -
New compatible version and compatible version conversion file
新增兼容版本以及兼容版本转换文件
🟡 Changed / 变更
-
Change the function names of functions
move_widget,correct_textandchange_colortomove,textandcolorrespectively
分别将函数move_widget、correct_text和change_color的函数名变更为move、text和color -
Corrected some parameters
修正了些许参数 -
Increase the default frame rate parameter of the move function to 30
提高了移动函数的默认帧率参数至 30
🔵 Optimized / 优化
- Optimized the code structure of the
colorfunction and themovefunction to make it more concise
优化了color函数和move函数的代码结构,使其更加简洁
🔖 2.5.6¶
🕓 Release Date / 发布日期 : 2022-12-12
🟣 Fixed / 修复
-
Fixed the bug that the singleton mode class (
Singleton) could not pass parameters during initialization
修复了单例模式类(Singleton)在初始化时无法传递参数的 bug -
Fixed the bug that sometimes the font parameters of
_CanvasItemIdcould not be found when scaling fonts inCanvasclass
修复Canvas类在缩放字体时,有时会找不到_CanvasItemId的字体参数的 bug
🟡 Changed / 变更
- The zoom method of the picture is changed from absolute zoom to relative absolute zoom
图片的缩放方式由绝对缩放变更为相对的绝对缩放方式
🔵 Optimized / 优化
-
Optimized the structure of the
PhotoImageclass
优化了PhotoImage类的结构 -
All useless codes (TODO marked) are deleted
删除了所有无用的代码(TODO 标记的) -
The
fractionsmodule is introduced to improve the precision of image scaling and reduce the operation time
引入了 fractions 模块并提高了图片缩放时的精度且减少了运算时间
🔴 Removed / 移除
Canvasclass deletes two redundant and overridden instance methods:create_ bitmapandcreate_ window
Canvas类删除了两个冗余的、重写的实例方法:create_bitmap和create_window
🔖 2.5.5¶
🕓 Release Date / 发布日期 : 2022-12-11
🟢 Added / 新增
- Added type prompt
Selffor theselfparameter of instance methods of all classes
为所有类的实例方法的self参数添加了类型提示Self
🟣 Fixed / 修复
- Fixed the bug that the width and height will not change in some cases when scaling
Canvasclasses
修复Canvas类缩放时,宽高在某些情况下不会改变的 bug
🟡 Changed / 变更
-
Modified the access method of
Tkclass,Toplevelclass andCanvasclass protection attributes
修改了Tk类、Toplevel类、Canvas类的保护属性的获取方式 -
Greatly modified the canvas scaling mechanism, fully adapted to all situations, and accelerated the scaling speed
大幅度地修改了画布缩放的机制,完全适应所有情况,并加快了缩放速度
🔵 Optimized / 优化
- Optimize the structure of all multiple loops and judgment statements, making the code more beautiful
优化了所有多重循环加判断语句的结构,使代码更为美观
🔖 2.5.4¶
🕓 Release Date / 发布日期 : 2022-12-08
🟢 Added / 新增
- A new widget has been added: progress bar(
Progressbar)
增加了一个新的控件:进度条(Progressbar)
🟣 Fixed / 修复
-
Fixed the bug that the screen size would be abnormal when creating
Canvasof different sizes
修复了新建不同大小的Canvas时,画面大小会异常的 bug -
Solved the bug that there is no change when the font size is scaled under certain conditions
解决了字体大小进行缩放时,在某种条件下缩小没有变化的 bug -
Solved the bug that function
move_widgetcannot movetkinter._CanvasItemId
解决了函数move_widget无法移动tkinter._CanvasItemId的 bug
🟡 Changed / 变更
- The binding mechanism of associated events has been modified so that
Canvasclasses can be created at any time
修改了关联事件的绑定机制,使得Canvas类可以被随时创建
🔵 Optimized / 优化
-
Some colors are beautified
美化了部分颜色 -
Optimized some codes in function
move_widget
优化了函数move_widget中的部分代码
🔖 2.5.3¶
🕓 Release Date / 发布日期 : 2022-11-27
🟢 Added / 新增
-
Added singleton pattern(
Singleton) class for inheritance
增加了单例模式类(Singleton)供继承 -
Add some methods (attributes) of
Tk,ToplevelandCanvasto access some attributes that should not be directly accessed
增加Tk、Toplevel、Canvas的一些方法(属性)来访问一些不应该被直接访问的属性
🟣 Fixed / 修复
- Solved the bug that the
destroymethod of the widget can only delete half of the widgets when traversing
解决了控件的destroy方法在遍历使用时只能删除一半控件的 bug
🔵 Optimized / 优化
-
Canvasclass overridesdestroymethod to be compatible with the originaldestroymethod
Canvas类重写destroy方法以兼容原destroy方法 -
Toplevelclass overridesdestroymethod to be compatible with the originaldestroymethod
Toplevel类重写destroy方法以兼容原destroy方法 -
Some codes of
TkandToplevelare optimized, and the code amount ofToplevelwidgets is greatly reduced
优化了Tk、Toplevel的部分代码,Toplevel控件的代码量大大缩减
🔴 Removed / 移除
- The
proportion_lockparameter and its function ofTkandToplevelare deleted
删除了Tk、Toplevel的proportion_lock参数及其功能
🔖 2.5.2¶
🕓 Release Date / 发布日期 : 2022-11-25
🟢 Added / 新增
- Added mouse style for text type virtual widget
添加了对文本类虚拟控件的鼠标样式
🟣 Fixed / 修复
-
Solved the bug that the
setandappendmethods of text virtual widgets may fail in some cases
解决了文本类虚拟控件set、append方法某些时候会失效的 bug -
Solved the bug that the mouse style flickers when the mouse cursor moves over the button
解决了鼠标光标移动到按钮上时的鼠标样式会闪烁的 bug -
Fixed the bug that the
readparameter of the text box widget failed
修复了文本框控件read参数失效的 bug
🔵 Optimized / 优化
- Change the mouse position detection order to further improve the running speed
改变鼠标位置检测顺序,进一步提升运行速度
🔖 2.5.1¶
🕓 Release Date / 发布日期 : 2022-11-23
🟢 Added / 新增
- Added mouse style for button virtual widgets
添加了对按钮虚拟控件的鼠标样式
🟣 Fixed / 修复
-
Solved the bug that the input prompt position was not aligned after the input box was enlarged
解决了输入框放大后输入提示符位置没对齐的 bug -
Solved the bug that text virtual widgets will lose focus after being pasted once
解决了文本类虚拟控件粘贴一次后会失去焦点的 bug -
Fix a few errors in the module documentation
修复模块文档中的少许错误
🟡 Changed / 变更
- Modified the mouse position determination mechanism and improved the running speed
修改了鼠标位置判定机制,同时提升运行速度
🔵 Optimized / 优化
- Some redundant codes are deleted to improve the overall running speed
删除了部分冗余代码,提升总体运行速度
📑 Older Logs / 旧日志¶
| Version / 版本 | Release Date / 发布日期 | Description / 描述 |
|---|---|---|
2.5.0 | 2022-11-21 | Upload the package to PyPI 🚀 上传包到 PyPI 🚀 |
2.4.15 | 2022-11-18 | Drew and uploaded the first version of the logo 绘制并上传了第一版的图标 |
2.4.14 | 2022-11-14 | |
2.4.11 | 2022-11-13 | |
2.4.10 | 2022-11-10 | |
2.4.2 | 2022-11-05 | |
2.4.1 | 2022-11-03 | |
2.4.0 | 2022-11-02 | |
2.3.5 | 2022-11-01 | |
2.3.1 | 2022-10-25 | Added project license (MulanPSL-2) 添加了项目开源许可(MulanPSL-2) |
2.3.0 | 2022-10-22 | |
2.2.4 | 2022-10-20 | |
2.2 | 2022-10-19 | |
1.4 | 2022-09-21 | |
1.3 | 2022-09-20 | |
1.0 | 2022-09-10 | The repository was created and uploaded 🎉 创建并上传了仓库 🎉 |
0.2 | 2022-08-29 | Modularize codes gradually 逐渐模块化了代码 |
0.1 | 2022-07-23 | Where the dream begins! 梦开始的地方! |