Merge pull request #17186 from Ultimaker/CURA-11263-about-dialog-blemishes

about dialog blemishes
This commit is contained in:
Erwan MATHIEU 2023-11-03 15:13:29 +01:00 committed by GitHub
commit ad868434f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 4 deletions

View File

@ -1,8 +1,6 @@
# Copyright (c) 2023 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.
from pkg_resources import working_set
CuraAppName = "{{ cura_app_name }}"
CuraAppDisplayName = "{{ cura_app_display_name }}"
CuraVersion = "{{ cura_version }}"
@ -16,4 +14,4 @@ CuraDigitalFactoryURL = "{{ cura_digital_factory_url }}"
CuraLatestURL = "{{ cura_latest_url }}"
ConanInstalls = {{ conan_installs }}
PythonInstalls = {package.key: {'version': package.version} for package in working_set}
PythonInstalls = {{ python_installs }}

View File

@ -152,6 +152,23 @@ class CuraConan(ConanFile):
}
return conan_installs
def _python_installs(self):
python_installs = {}
# list of python installs
python_ins_cmd = f"python -c \"import pkg_resources; print(';'.join([(s.key+','+ s.version) for s in pkg_resources.working_set]))\""
from six import StringIO
buffer = StringIO()
self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=buffer)
packages = str(buffer.getvalue()).split("-----------------\n")
packages = packages[1].strip('\r\n').split(";")
for package in packages:
name, version = package.split(",")
python_installs[name] = {"version": version}
return python_installs
def _generate_cura_version(self, location):
with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f:
cura_version_py = Template(f.read())
@ -178,6 +195,7 @@ class CuraConan(ConanFile):
cura_digital_factory_url = self.conan_data["urls"][self._urls]["digital_factory_url"],
cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"],
conan_installs=self._conan_installs(),
python_installs=self._python_installs(),
))
def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file):

View File

@ -38,6 +38,8 @@ UM.Dialog
width: Math.floor(base.width * 0.85)
height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)
source: UM.Theme.getImage("logo")
sourceSize.width: width
sourceSize.height: height
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
@ -107,9 +109,10 @@ UM.Dialog
Flickable
{
id: scroll
anchors.fill: parent
ScrollBar.vertical: UM.ScrollBar {
visible: contentHeight > height
visible: scroll.contentHeight > height
}
contentHeight: content.height
clip: true