helloSystem / Utilities

Utilities written in PyQt5, meant for use with helloSystem
BSD 2-Clause "Simplified" License
27 stars 29 forks source link

Upgrade some icon #226

Open louies0623 opened 1 year ago

louies0623 commented 1 year ago

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

probonopd commented 1 year ago

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

louies0623 commented 1 year ago

@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 commented 1 year ago

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

probonopd commented 1 year ago

Thank you @louies0623. So,

Public Domain Dedication (CC0)

for all icons in this pull request. Correct?

Hierosme commented 1 year ago

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.

probonopd commented 1 year ago

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

Hierosme commented 1 year ago

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 ?

louies0623 commented 1 year ago

Thank you @louies0623. So,

Public Domain Dedication (CC0)

for all icons in this pull request. Correct?

@probonopd ,Correct.

louies0623 commented 1 year ago

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 commented 1 year ago

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

louies0623 commented 1 year ago

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

louies0623 commented 1 year ago

@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 commented 1 year ago

@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.

Hierosme commented 9 months ago

@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 commented 9 months ago

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