mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:25:53 +08:00
Merge pull request #17186 from Ultimaker/CURA-11263-about-dialog-blemishes
about dialog blemishes
This commit is contained in:
commit
ad868434f3
@ -1,8 +1,6 @@
|
|||||||
# Copyright (c) 2023 UltiMaker
|
# Copyright (c) 2023 UltiMaker
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from pkg_resources import working_set
|
|
||||||
|
|
||||||
CuraAppName = "{{ cura_app_name }}"
|
CuraAppName = "{{ cura_app_name }}"
|
||||||
CuraAppDisplayName = "{{ cura_app_display_name }}"
|
CuraAppDisplayName = "{{ cura_app_display_name }}"
|
||||||
CuraVersion = "{{ cura_version }}"
|
CuraVersion = "{{ cura_version }}"
|
||||||
@ -16,4 +14,4 @@ CuraDigitalFactoryURL = "{{ cura_digital_factory_url }}"
|
|||||||
CuraLatestURL = "{{ cura_latest_url }}"
|
CuraLatestURL = "{{ cura_latest_url }}"
|
||||||
|
|
||||||
ConanInstalls = {{ conan_installs }}
|
ConanInstalls = {{ conan_installs }}
|
||||||
PythonInstalls = {package.key: {'version': package.version} for package in working_set}
|
PythonInstalls = {{ python_installs }}
|
||||||
|
18
conanfile.py
18
conanfile.py
@ -152,6 +152,23 @@ class CuraConan(ConanFile):
|
|||||||
}
|
}
|
||||||
return conan_installs
|
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):
|
def _generate_cura_version(self, location):
|
||||||
with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f:
|
with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f:
|
||||||
cura_version_py = Template(f.read())
|
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_digital_factory_url = self.conan_data["urls"][self._urls]["digital_factory_url"],
|
||||||
cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"],
|
cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"],
|
||||||
conan_installs=self._conan_installs(),
|
conan_installs=self._conan_installs(),
|
||||||
|
python_installs=self._python_installs(),
|
||||||
))
|
))
|
||||||
|
|
||||||
def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file):
|
def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file):
|
||||||
|
@ -38,6 +38,8 @@ UM.Dialog
|
|||||||
width: Math.floor(base.width * 0.85)
|
width: Math.floor(base.width * 0.85)
|
||||||
height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)
|
height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)
|
||||||
source: UM.Theme.getImage("logo")
|
source: UM.Theme.getImage("logo")
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -107,9 +109,10 @@ UM.Dialog
|
|||||||
|
|
||||||
Flickable
|
Flickable
|
||||||
{
|
{
|
||||||
|
id: scroll
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ScrollBar.vertical: UM.ScrollBar {
|
ScrollBar.vertical: UM.ScrollBar {
|
||||||
visible: contentHeight > height
|
visible: scroll.contentHeight > height
|
||||||
}
|
}
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
clip: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user