Open louies0623 opened 1 year ago
Hi @louies0623. Did you make those? What is the license?
@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.
@probonopd Heare ,licenses. https://www.flickr.com/photos/199288982@N02/with/53245752844/
Thank you @louies0623. So,
for all icons in this pull request. Correct?
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.
Yes, os.path.join
is the correct way because it is platform idependent - not all systems use /
.
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 ?
Thank you @louies0623. So,
for all icons in this pull request. Correct?
@probonopd ,Correct.
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.
@Hierosme If possible, please tell me what I can do.
self.setPixmap(QtWidgets.QWizard.BackgroundPixmap, QtGui.QPixmap(os.path.dirname(__file__) + '/background.png'))
Replacing a copyrighted image.https://github.com/helloSystem/Utilities/pull/226/commits/40412a856e868d6656a9addbef83dd6841970369
@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'))
@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 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'))
toself.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)
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
Redesign some icons and reduce the capacity occupied by the icon size.