Thonny菜单栏某锅锅旗按钮让我想起了notepad++事件,但好在Thonny的UI部分没有编译,所以可以快速修改。
教程:
删除按钮:打开Thonny根目录/Lib/site-packages/thonny/workbench.py,查找工具查找Support Ukraine,把函数删了,另存为到桌面,替换原目录文件,重启Thonny
自定义按钮:
1、打开Thonny根目录/Lib/site-packages/thonny/workbench.py,查找工具查找Support Ukraine,把tr和括号去掉,修改自己喜欢的字符串(如: Слава Россия),然后搜索Support-Ukraine,把网址换成自己喜欢的网址(如mail.ru等),另存为到桌面,替换原目录文件
2、打开Windows自带的画图工具,从网上找你喜欢的正方形图片,右键复制图片,粘贴到画图软件内,然后点画布外的蓝色部分,点重新调整大小,调整到32x32,另存为到桌面,Ukraine_2x.png,再调整到16x16,另存为到桌面,Ukraine.png,最后把这两个png图像剪切到Thonny根目录/Lib/site-packages/thonny/res文件夹,替换原文件,重启Thonny
过程及最终效果如下:
![](http://tiebapic.baidu.com/forum/w%3D580/sign=33b00d09fca1cd1105b672288912c8b0/fc340b23dd54564e59340d00f5de9c82d1584f13.jpg?tbpicau=2024-09-18-05_f6f51a754b2398d62e97ace29a0fbb35)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=10a21ff4ba039245a1b5e107b794a4a8/6438cebf6c81800acab46037f73533fa828b4713.jpg?tbpicau=2024-09-18-05_61f25e8931709e23df07ae40b864c513)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=977c651b8efcc3ceb4c0c93ba245d6b7/6469b1de9c82d1581cd3b088c60a19d8bc3e4213.jpg?tbpicau=2024-09-18-05_996fe98a5913ac4d7237d5f09ac5546c)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=703dd3ba492442a7ae0efdade143ad95/6460b8a1cd11728ba97c651b8efcc3cec3fd2c13.jpg?tbpicau=2024-09-18-05_35e529f9fb9fbee0035e7a3d23629499)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=b70a0c1f4f24ab18e016e13f05fae69a/12e6cb177f3e67092c51acc67dc79f3df8dc5513.jpg?tbpicau=2024-09-18-05_8e8d7963391ecf98eaca0f51c92743cc)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=96e5425849b30f24359aec0bf895d192/4dbcd300baa1cd119fe79b19ff12c8fcc3ce2d13.jpg?tbpicau=2024-09-18-05_fffa2d5e7cbae49e5f6c66874831c345)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=879c2b3fe9c379317d688621dbc4b784/bb9419d5ad6eddc4aeb65dc27fdbb6fd52663313.jpg?tbpicau=2024-09-18-05_f2d075acc74b15b889ca232cd47f06db)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=b77437cdf14543a9f51bfac42e178a7b/34ab3bdbb6fd5266d47bd52ded18972bd4073613.jpg?tbpicau=2024-09-18-05_8cf0ed9d805dd3a60771a141fdc76fb2)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=09386f10adc4b7453494b71efffc1e78/e4ba83cb39dbb6fd510b0c1f4f24ab18972b3713.jpg?tbpicau=2024-09-18-05_535d45c78417f773403fd80c53bc3912)
教程:
删除按钮:打开Thonny根目录/Lib/site-packages/thonny/workbench.py,查找工具查找Support Ukraine,把函数删了,另存为到桌面,替换原目录文件,重启Thonny
自定义按钮:
1、打开Thonny根目录/Lib/site-packages/thonny/workbench.py,查找工具查找Support Ukraine,把tr和括号去掉,修改自己喜欢的字符串(如: Слава Россия),然后搜索Support-Ukraine,把网址换成自己喜欢的网址(如mail.ru等),另存为到桌面,替换原目录文件
2、打开Windows自带的画图工具,从网上找你喜欢的正方形图片,右键复制图片,粘贴到画图软件内,然后点画布外的蓝色部分,点重新调整大小,调整到32x32,另存为到桌面,Ukraine_2x.png,再调整到16x16,另存为到桌面,Ukraine.png,最后把这两个png图像剪切到Thonny根目录/Lib/site-packages/thonny/res文件夹,替换原文件,重启Thonny
过程及最终效果如下:
![](http://tiebapic.baidu.com/forum/w%3D580/sign=33b00d09fca1cd1105b672288912c8b0/fc340b23dd54564e59340d00f5de9c82d1584f13.jpg?tbpicau=2024-09-18-05_f6f51a754b2398d62e97ace29a0fbb35)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=10a21ff4ba039245a1b5e107b794a4a8/6438cebf6c81800acab46037f73533fa828b4713.jpg?tbpicau=2024-09-18-05_61f25e8931709e23df07ae40b864c513)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=977c651b8efcc3ceb4c0c93ba245d6b7/6469b1de9c82d1581cd3b088c60a19d8bc3e4213.jpg?tbpicau=2024-09-18-05_996fe98a5913ac4d7237d5f09ac5546c)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=703dd3ba492442a7ae0efdade143ad95/6460b8a1cd11728ba97c651b8efcc3cec3fd2c13.jpg?tbpicau=2024-09-18-05_35e529f9fb9fbee0035e7a3d23629499)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=b70a0c1f4f24ab18e016e13f05fae69a/12e6cb177f3e67092c51acc67dc79f3df8dc5513.jpg?tbpicau=2024-09-18-05_8e8d7963391ecf98eaca0f51c92743cc)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=96e5425849b30f24359aec0bf895d192/4dbcd300baa1cd119fe79b19ff12c8fcc3ce2d13.jpg?tbpicau=2024-09-18-05_fffa2d5e7cbae49e5f6c66874831c345)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=879c2b3fe9c379317d688621dbc4b784/bb9419d5ad6eddc4aeb65dc27fdbb6fd52663313.jpg?tbpicau=2024-09-18-05_f2d075acc74b15b889ca232cd47f06db)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=b77437cdf14543a9f51bfac42e178a7b/34ab3bdbb6fd5266d47bd52ded18972bd4073613.jpg?tbpicau=2024-09-18-05_8cf0ed9d805dd3a60771a141fdc76fb2)
![](http://tiebapic.baidu.com/forum/w%3D580/sign=09386f10adc4b7453494b71efffc1e78/e4ba83cb39dbb6fd510b0c1f4f24ab18972b3713.jpg?tbpicau=2024-09-18-05_535d45c78417f773403fd80c53bc3912)