BallonsTranslator
BallonsTranslator copied to clipboard
Icon
I've been working on adding an icon here. Everything worked out, but I still don't understand how to change the icon in the Windows taskbar

We drew the icon from scratch with Lavanette
self.setWindowTitle("My Window") self.setWindowIcon(QtGui.QIcon('test_icon.png'))
used this module
Whoa, thanks in advance!
Copy-paste following lines into ballontranslator/__main__.py
if sys.platform == 'win32':
import ctypes
myappid = u'BalloonsTranslator' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
Besides, I would like to suggest using #697187 instead of pure black.
And would you kindly make it a bit less like DeepL's?
Besides, I would like to suggest using #697187 instead of pure black. And would you kindly make it a bit less like DeepL's?
- I think we'll edit color.
- The reference was just taken from DeepL) I have already sent the files to the email address specified in your github profile. I'm just warning you. Now we will quickly make a redesign
Thanks again! I have made the pre-mentioned changes to master branch. You only need to modify the following line to specify the icon file path: https://github.com/dmMaze/BallonsTranslator/blob/18a65651dce7700e24de9e17496173cc3d58cdfb/ballontranslator/ui/constants.py#L3
For some reason windows refuses to show the icon in the taskbar. Maybe it's because I have the Python microsoft store?
Did you update to 18a65651dce7700e24de9e17496173cc3d58cdfb?

Run the following code, what's the output?
import sys
print(sys.platform)

hmm, it works on my set:
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
PyQt: v 5.15.4
try add app.setWindowIcon(QIcon(constants.ICON_PATH)) following this line: https://github.com/dmMaze/BallonsTranslator/blob/18a65651dce7700e24de9e17496173cc3d58cdfb/ballontranslator/main.py#L42
Failure again. I think the fact is that I have a python version downloaded from the MIcrosoft Store and windows stupidly blocks any changes
Did the program's terminal spit out any unsual message on start-up?
D:\ai\BallonsTranslator\ballontranslator>python __main__.py
[INFO ] dl_manager:on_finish_setdetector:622 - Text detector set to ctd
[INFO ] dl_manager:on_finish_settranslator:643 - Translator set to google
[INFO ] dl_manager:on_finish_setinpainter:635 - Inpainter set to aot
[INFO ] dl_manager:on_finish_setocr:628 - OCR set to mit48px_ctc
And nothing more
Maybe we should switch to some messenger (by the type of telegram) to communicate more conveniently?
You may send a telegram chat link to [email protected]
I send
I'll close the question for now. There is an updated icon in my fork, someday we will get to the icon, but not now.