BallonsTranslator icon indicating copy to clipboard operation
BallonsTranslator copied to clipboard

Icon

Open bropines opened this issue 3 years ago • 13 comments
trafficstars

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 image

We drew the icon from scratch with Lavanette

bropines avatar Aug 29 '22 10:08 bropines

self.setWindowTitle("My Window") self.setWindowIcon(QtGui.QIcon('test_icon.png')) used this module

bropines avatar Aug 29 '22 11:08 bropines

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)
image

Besides, I would like to suggest using #697187 instead of pure black.
And would you kindly make it a bit less like DeepL's?

dmMaze avatar Aug 29 '22 12:08 dmMaze

Besides, I would like to suggest using #697187 instead of pure black. And would you kindly make it a bit less like DeepL's?

  1. I think we'll edit color.
  2. 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

bropines avatar Aug 29 '22 12:08 bropines

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

dmMaze avatar Aug 29 '22 12:08 dmMaze

image For some reason windows refuses to show the icon in the taskbar. Maybe it's because I have the Python microsoft store?

bropines avatar Aug 29 '22 13:08 bropines

Did you update to 18a65651dce7700e24de9e17496173cc3d58cdfb? image

Run the following code, what's the output?

import sys
print(sys.platform)

dmMaze avatar Aug 29 '22 14:08 dmMaze

image

bropines avatar Aug 29 '22 14:08 bropines

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

dmMaze avatar Aug 29 '22 14:08 dmMaze

image Failure again. I think the fact is that I have a python version downloaded from the MIcrosoft Store and windows stupidly blocks any changes

bropines avatar Aug 29 '22 15:08 bropines

Did the program's terminal spit out any unsual message on start-up?

dmMaze avatar Aug 29 '22 15:08 dmMaze

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?

bropines avatar Aug 29 '22 15:08 bropines

You may send a telegram chat link to [email protected]

dmMaze avatar Aug 29 '22 15:08 dmMaze

I send

bropines avatar Aug 29 '22 15:08 bropines

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.

bropines avatar Sep 30 '22 10:09 bropines