Utilities icon indicating copy to clipboard operation
Utilities copied to clipboard

Upgrade some icon

Open louies0623 opened this issue 1 year ago • 15 comments

Redesign some icons and reduce the capacity occupied by the icon size.

louies0623 avatar Oct 08 '23 22:10 louies0623

Hi @louies0623. Did you make those? What is the license?

probonopd avatar Oct 09 '23 06:10 probonopd

@probonopd I want to use "CC0", but our language translation is not complete, and they don't have very clear information to use, but I only design the Installation icon, and Debian and sharing, and the rest are just simple modifications. , mostly use elemtery os icon to modify.

Update :CC0 is better, and it’s easier for future people to use. Anyway, it’s not bad.

louies0623 avatar Oct 09 '23 09:10 louies0623

@probonopd Heare ,licenses. https://www.flickr.com/photos/199288982@N02/with/53245752844/

louies0623 avatar Oct 09 '23 11:10 louies0623

Thank you @louies0623. So,

Public Domain Dedication (CC0)

for all icons in this pull request. Correct?

probonopd avatar Oct 09 '23 17:10 probonopd

i recommand to use os.path.join(toto, titi) and not str concatenation like str(toto + "/" + titi). That is more robust and cross platform (The goal of the OS module).

If really special thing have to be done the better is the os.path.join() coupled with str format. format is really speed.

then

str(toto + "/" + titi) is more slow as e"{toto}/{titi}" .

just for the tips:

The correct way is e"{toto}{os.sep}{titi}" then that is exactlly what os.path.join() do...

I'm not sure to can modify the PR.

Hierosme avatar Oct 09 '23 18:10 Hierosme

Yes, os.path.join is the correct way because it is platform idependent - not all systems use /.

probonopd avatar Oct 09 '23 19:10 probonopd

os.path.join(os.path.dirname(__file__), "Grab.png") pure style.

like :

        msg.setIconPixmap(
            QPixmap(os.path.join(os.path.dirname(__file__), "Grab.png")).scaled(
                48, 48, Qt.KeepAspectRatio, Qt.SmoothTransformation
            )
        )

@louies0623 is it possible make it improvement ?

Hierosme avatar Oct 09 '23 19:10 Hierosme

Thank you @louies0623. So,

Public Domain Dedication (CC0)

for all icons in this pull request. Correct?

@probonopd ,Correct.

louies0623 avatar Oct 09 '23 21:10 louies0623

os.path.join(os.path.dirname(__file__), "Grab.png") pure style.

like :

        msg.setIconPixmap(
            QPixmap(os.path.join(os.path.dirname(__file__), "Grab.png")).scaled(
                48, 48, Qt.KeepAspectRatio, Qt.SmoothTransformation
            )
        )

@louies0623 is it possible make it improvement ?

@Hierosme I actually don't know how to deal with this. I'm sorry that I can't help.

louies0623 avatar Oct 09 '23 22:10 louies0623

@Hierosme If possible, please tell me what I can do. self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.dirname(__file__) + '/background.png'))

louies0623 avatar Oct 10 '23 03:10 louies0623

Replacing a copyrighted image.https://github.com/helloSystem/Utilities/pull/226/commits/40412a856e868d6656a9addbef83dd6841970369

louies0623 avatar Oct 11 '23 03:10 louies0623

@Hierosme Could you please replace "os.path.dirname" directly with "os.path.join"? For example, this paragraph. This self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.dirname(__file__) + '/Welcome.png')) to self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.join (__file__) + '/Welcome.png'))

louies0623 avatar Oct 14 '23 13:10 louies0623

@probonopd Most of the icons have been replaced. As for the modification of the code, I am sorry that I am not capable enough. You may need to modify it later.

louies0623 avatar Oct 30 '23 16:10 louies0623

@Hierosme Could you please replace "os.path.dirname" directly with "os.path.join"? For example, this paragraph. This self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.dirname(__file__) + '/Welcome.png')) to self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.join (__file__) + '/Welcome.png'))

If fact no:

os.path.join() join a list for create a cross platform path by determine the value of os.path.sep ( / or \) od.path.dirname() is coupled with file_ get the true directory where is store the py file it self.

From my point the syntax should be

logo_pixmap = QtGui.QPixmap(
    os.path.join(
        os.path.dirname(__file__) ,
        'failed.png'
)).scaledToHeight(256, QtCore.Qt.SmoothTransformation)

Hierosme avatar Feb 10 '24 20:02 Hierosme

Any news of it pull request ? @louies0623 have make a huge work and a merge is require from my point.

The image path it not a trouble, i can open an other MR and fixe every pure style path trouble. Pure style is not a issue, when it work it work ...

Regards

Hierosme avatar Feb 14 '24 11:02 Hierosme