try to hack qt6.5 support
This commit is contained in:
parent
f257a828dc
commit
8b2953b5d4
3 changed files with 123 additions and 1 deletions
68
Uranium-5.3.0-qt-6.5-hack.patch
Normal file
68
Uranium-5.3.0-qt-6.5-hack.patch
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
diff -up Uranium-5.3.0/UM/Qt/qml/UM/qmldir.qt65 Uranium-5.3.0/UM/Qt/qml/UM/qmldir
|
||||
--- Uranium-5.3.0/UM/Qt/qml/UM/qmldir.qt65 2023-05-22 11:48:10.779310352 -0400
|
||||
+++ Uranium-5.3.0/UM/Qt/qml/UM/qmldir 2023-05-22 11:48:31.404560978 -0400
|
||||
@@ -1,6 +1,7 @@
|
||||
module Uranium
|
||||
|
||||
ApplicationMenu 1.0 ApplicationMenu.qml
|
||||
+RecolorImage 1.0 RecolorImage.qml
|
||||
MessageStack 1.0 MessageStack.qml
|
||||
Dialog 1.0 Dialog.qml
|
||||
|
||||
diff -up Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml.qt65 Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml
|
||||
--- Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml.qt65 2023-05-22 11:46:42.419236608 -0400
|
||||
+++ Uranium-5.3.0/UM/Qt/qml/UM/RecolorImage.qml 2023-05-22 11:47:01.327466370 -0400
|
||||
@@ -0,0 +1,35 @@
|
||||
+// Copyright (c) 2018 Ultimaker B.V.
|
||||
+// Uranium is released under the terms of the LGPLv3 or higher.
|
||||
+
|
||||
+import QtQuick 2.1
|
||||
+import UM 1.3 as UM
|
||||
+
|
||||
+Item
|
||||
+{
|
||||
+ id: base;
|
||||
+
|
||||
+ property alias source: img.source
|
||||
+ property alias color: shader.color
|
||||
+ property alias sourceSize: img.sourceSize
|
||||
+
|
||||
+ Image
|
||||
+ {
|
||||
+ id: img
|
||||
+ anchors.fill: parent
|
||||
+ visible: false
|
||||
+ sourceSize.width: parent.width
|
||||
+ sourceSize.height: parent.height
|
||||
+ }
|
||||
+
|
||||
+ ShaderEffect
|
||||
+ {
|
||||
+ id: shader
|
||||
+ anchors.fill: parent
|
||||
+
|
||||
+ property variant src: img
|
||||
+ property color color: "#fff"
|
||||
+
|
||||
+ vertexShader: Resources.getPath(Resources.Shaders, "recolor_image.vert.qsb")
|
||||
+ fragmentShader: Resources.getPath(Resources.Shaders, "recolor_image.frag.qsb")
|
||||
+ }
|
||||
+}
|
||||
diff -up Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml.qt65 Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml
|
||||
--- Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml.qt65 2023-05-22 11:47:45.530003515 -0400
|
||||
+++ Uranium-5.3.0/UM/Qt/qml/UM/SimpleButton.qml 2023-05-22 11:47:53.582101367 -0400
|
||||
@@ -27,12 +27,13 @@ MouseArea
|
||||
radius: 0
|
||||
}
|
||||
|
||||
- ColorImage
|
||||
+ RecolorImage
|
||||
{
|
||||
id: image
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: base.iconMargin
|
||||
+ sourceSize.height: width
|
||||
|
||||
color: base.containsMouse ? base.hoverColor : base.color
|
||||
|
||||
49
Uranium-5.3.0-qt-replace-gltrue-glfalse-with-bytes.patch
Normal file
49
Uranium-5.3.0-qt-replace-gltrue-glfalse-with-bytes.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
diff -up Uranium-5.3.0/UM/View/RenderBatch.py.glfix Uranium-5.3.0/UM/View/RenderBatch.py
|
||||
--- Uranium-5.3.0/UM/View/RenderBatch.py.glfix 2023-05-22 12:24:01.766428096 -0400
|
||||
+++ Uranium-5.3.0/UM/View/RenderBatch.py 2023-05-22 12:24:25.918715384 -0400
|
||||
@@ -186,10 +186,10 @@ class RenderBatch:
|
||||
|
||||
if self._render_type == self.RenderType.Solid:
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ self._gl.glDepthMask(b'1')
|
||||
elif self._render_type == self.RenderType.Transparent:
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glDepthMask(self._gl.GL_FALSE)
|
||||
+ self._gl.glDepthMask(b'0')
|
||||
elif self._render_type == self.RenderType.Overlay:
|
||||
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
|
||||
|
||||
diff -up Uranium-5.3.0/UM/View/RenderPass.py.glfix Uranium-5.3.0/UM/View/RenderPass.py
|
||||
--- Uranium-5.3.0/UM/View/RenderPass.py.glfix 2023-05-22 12:24:33.374804074 -0400
|
||||
+++ Uranium-5.3.0/UM/View/RenderPass.py 2023-05-22 12:25:06.914207005 -0400
|
||||
@@ -93,8 +93,8 @@ class RenderPass:
|
||||
self._fbo.bind()
|
||||
|
||||
# Ensure we can actually write to the relevant FBO components.
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE,self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
- self._gl.glDepthMask(self._gl.GL_TRUE)
|
||||
+ self._gl.glColorMask(b'1', b'1',b'1', b'1')
|
||||
+ self._gl.glDepthMask(b'1')
|
||||
|
||||
self._gl.glClear(self._gl.GL_COLOR_BUFFER_BIT | self._gl.GL_DEPTH_BUFFER_BIT)
|
||||
|
||||
diff -up Uranium-5.3.0/UM/View/SelectionPass.py.glfix Uranium-5.3.0/UM/View/SelectionPass.py
|
||||
--- Uranium-5.3.0/UM/View/SelectionPass.py.glfix 2023-05-22 12:25:22.790403768 -0400
|
||||
+++ Uranium-5.3.0/UM/View/SelectionPass.py 2023-05-22 12:26:49.585479447 -0400
|
||||
@@ -109,13 +109,13 @@ class SelectionPass(RenderPass):
|
||||
if selectable_objects:
|
||||
batch.render(self._scene.getActiveCamera())
|
||||
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_FALSE)
|
||||
+ self._gl.glColorMask(b'1', b'1', b'1', b'0')
|
||||
self._gl.glDisable(self._gl.GL_DEPTH_TEST)
|
||||
|
||||
tool_handle.render(self._scene.getActiveCamera())
|
||||
|
||||
self._gl.glEnable(self._gl.GL_DEPTH_TEST)
|
||||
- self._gl.glColorMask(self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE, self._gl.GL_TRUE)
|
||||
+ self._gl.glColorMask(b'1', b'1', b'1', b'1')
|
||||
|
||||
self.release()
|
||||
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
Name: python-uranium
|
||||
Version: 5.3.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A Python framework for building desktop applications
|
||||
License: LGPLv3+
|
||||
URL: https://github.com/Ultimaker/Uranium
|
||||
Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
Patch0: Uranium-5.3.0-qt-6.5-hack.patch
|
||||
Patch1: Uranium-5.3.0-qt-replace-gltrue-glfalse-with-bytes.patch
|
||||
|
||||
# Cmake bits taken from 4.13.1, before upstream went nuts with conan
|
||||
Source2: mod_bundled_packages_json.py
|
||||
|
|
@ -131,6 +133,9 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon May 22 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-3
|
||||
- try to hack qt6.5 support
|
||||
|
||||
* Thu Mar 9 2023 Tom Callaway <spot@fedoraproject.org> - 5.3.0-2
|
||||
- make pyclipper an explicit Requires
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue